From 48bbd65ab4c0675f6dd2892a0316705a6a06b619 Mon Sep 17 00:00:00 2001 From: yikeke Date: Mon, 15 Jun 2020 13:50:21 +0800 Subject: [PATCH 1/7] fix auto label action --- .github/assign-by-files.yml | 10 +++++----- .github/auto-label.json | 4 ++-- .github/workflows/auto-assign.yml | 2 +- .github/workflows/auto-label.yml | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/assign-by-files.yml b/.github/assign-by-files.yml index 36950b02fa9db..4712c4faf1c64 100644 --- a/.github/assign-by-files.yml +++ b/.github/assign-by-files.yml @@ -1,4 +1,9 @@ --- +# Changing all md files should request a language review in case of format failures. +# TomShawn is the repo administrator. +'*.*': + - TomShawn + # you can use glob pattern # You can set multiple reviewers @@ -31,8 +36,3 @@ # 'ticdc/': # - WangXiangUSTC - -# Changing all md files should request a language review in case of format failures. -# TomShawn is the repo administrator. -'*.*': - - yikeke diff --git a/.github/auto-label.json b/.github/auto-label.json index d00f6973330ae..375deaf575596 100644 --- a/.github/auto-label.json +++ b/.github/auto-label.json @@ -1,6 +1,6 @@ { "rules": { "translation/welcome": ["*.md", "*.yml", "*.yaml", "*.json", "media/", "scripts/"], - "status/PTAL": ["*.md", "*.yml", "*.yaml", "*.json", "media/", "scripts/"] + "status/PTAL": ["*.*"] } -} \ No newline at end of file +} diff --git a/.github/workflows/auto-assign.yml b/.github/workflows/auto-assign.yml index e5a730c580faa..80d4be1fc03df 100644 --- a/.github/workflows/auto-assign.yml +++ b/.github/workflows/auto-assign.yml @@ -12,4 +12,4 @@ jobs: - uses: shufo/auto-assign-reviewer-by-files@v1.0.0 with: config: '.github/assign-by-files.yml' - token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/auto-label.yml b/.github/workflows/auto-label.yml index 1a498379833ea..cd5071acde538 100644 --- a/.github/workflows/auto-label.yml +++ b/.github/workflows/auto-label.yml @@ -13,4 +13,4 @@ jobs: - uses: actions/checkout@v2 - uses: banyan/auto-label@1.2 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 92957a5b801bd5816812564583ab413e661e5bad Mon Sep 17 00:00:00 2001 From: yikeke Date: Mon, 15 Jun 2020 14:23:09 +0800 Subject: [PATCH 2/7] add a new action https://github.com/marketplace/actions/auto-assign-action --- .github/auto_assign.yml | 26 ++++++++++++++++++++++++++ .github/workflows/action.yml | 28 ++++++++++++++++++++++++++++ .github/workflows/auto-assign.yml | 15 --------------- 3 files changed, 54 insertions(+), 15 deletions(-) create mode 100644 .github/auto_assign.yml create mode 100644 .github/workflows/action.yml delete mode 100644 .github/workflows/auto-assign.yml diff --git a/.github/auto_assign.yml b/.github/auto_assign.yml new file mode 100644 index 0000000000000..fbf879388a94e --- /dev/null +++ b/.github/auto_assign.yml @@ -0,0 +1,26 @@ +# Set to true to add reviewers to pull requests +addReviewers: true + +# Set to true to add assignees to pull requests +addAssignees: false + +# A list of reviewers to be added to pull requests (GitHub user name) +reviewers: + - TomShawn + +# A number of reviewers added to the pull request +# Set 0 to add all the reviewers (default: 0) +numberOfReviewers: 0 + +# A list of assignees, overrides reviewers if set +# assignees: +# - assigneeA + +# A number of assignees to add to the pull request +# Set to 0 to add all of the assignees. +# Uses numberOfReviewers if unset. +# numberOfAssignees: 2 + +# A list of keywords to be skipped the process that add reviewers if pull requests include it +# skipKeywords: +# - wip \ No newline at end of file diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml new file mode 100644 index 0000000000000..4904776a00e05 --- /dev/null +++ b/.github/workflows/action.yml @@ -0,0 +1,28 @@ +name: 'Auto Assign' +on: + pull_request: + branches: + - master + types: [opened, labeled] + +jobs: + add-reviews: + runs-on: ubuntu-latest + steps: + - uses: kentaro-m/auto-assign-action@v1.1.1 + +# name: "Auto Assign" +# on: +# pull_request: +# branches: +# - master +# types: [opened] + +# jobs: +# assign_reviewer: +# runs-on: ubuntu-latest +# steps: +# - uses: shufo/auto-assign-reviewer-by-files@v1.0.0 +# with: +# config: '.github/assign-by-files.yml' +# token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/auto-assign.yml b/.github/workflows/auto-assign.yml deleted file mode 100644 index 80d4be1fc03df..0000000000000 --- a/.github/workflows/auto-assign.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: "Auto Assign" -on: - pull_request: - branches: - - master - types: [opened] - -jobs: - assign_reviewer: - runs-on: ubuntu-latest - steps: - - uses: shufo/auto-assign-reviewer-by-files@v1.0.0 - with: - config: '.github/assign-by-files.yml' - token: ${{ secrets.GITHUB_TOKEN }} From 994c1470f57131384690a061b01f53b33103e49e Mon Sep 17 00:00:00 2001 From: yikeke Date: Mon, 15 Jun 2020 14:23:56 +0800 Subject: [PATCH 3/7] comment out auto-label.yml --- .github/workflows/auto-label.yml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/auto-label.yml b/.github/workflows/auto-label.yml index cd5071acde538..1914cc56b19bc 100644 --- a/.github/workflows/auto-label.yml +++ b/.github/workflows/auto-label.yml @@ -1,16 +1,16 @@ -name: Auto Label -on: - pull_request: - branches: - - master - types: [opened] +# name: Auto Label +# on: +# pull_request: +# branches: +# - master +# types: [opened] -jobs: - auto-label: - name: Auto Label - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: banyan/auto-label@1.2 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +# jobs: +# auto-label: +# name: Auto Label +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v2 +# - uses: banyan/auto-label@1.2 +# env: +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 5124a29561d43391a1549c12b3728df30340f48d Mon Sep 17 00:00:00 2001 From: yikeke Date: Mon, 15 Jun 2020 14:40:13 +0800 Subject: [PATCH 4/7] add a new action https://github.com/marketplace/actions/labeler --- .github/labeler.yml | 7 +++++++ .github/workflows/{auto-label.yml => labeler.yml} | 15 +++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 .github/labeler.yml rename .github/workflows/{auto-label.yml => labeler.yml} (56%) diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000000000..4a87cddd388a3 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,7 @@ +# Add 'label1' to any changes within 'example' folder or any subfolders +translation/welcome: + - any: ["*.md", "*.yml", "*.yaml", "*.json", "media/", "scripts/"] + +# Add 'label2' to any file changes within 'example2' folder +status/PTAL: + - any: ['*.*'] \ No newline at end of file diff --git a/.github/workflows/auto-label.yml b/.github/workflows/labeler.yml similarity index 56% rename from .github/workflows/auto-label.yml rename to .github/workflows/labeler.yml index 1914cc56b19bc..77bdde4fb467b 100644 --- a/.github/workflows/auto-label.yml +++ b/.github/workflows/labeler.yml @@ -1,3 +1,18 @@ +name: "Pull Request Labeler" +on: + pull_request: + branches: + - master + types: [opened, labeled] + +jobs: + triage: + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@v2 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" + # name: Auto Label # on: # pull_request: From 9dba89a823fd3eea909a41272ea48e9cde66d87d Mon Sep 17 00:00:00 2001 From: yikeke Date: Mon, 15 Jun 2020 14:42:46 +0800 Subject: [PATCH 5/7] " -> ' --- .github/labeler.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index 4a87cddd388a3..8627302eae1f3 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,6 +1,6 @@ # Add 'label1' to any changes within 'example' folder or any subfolders translation/welcome: - - any: ["*.md", "*.yml", "*.yaml", "*.json", "media/", "scripts/"] + - any: ['*.md', '*.yml', '*.yaml', '*.json', 'media/', 'scripts/'] # Add 'label2' to any file changes within 'example2' folder status/PTAL: From a8c0fd38adb113c0bcaa1796c669240314d2d0d2 Mon Sep 17 00:00:00 2001 From: yikeke Date: Mon, 15 Jun 2020 14:44:44 +0800 Subject: [PATCH 6/7] Update labeler.yml --- .github/labeler.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index 8627302eae1f3..e66d90462c015 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,7 +1,12 @@ # Add 'label1' to any changes within 'example' folder or any subfolders translation/welcome: - - any: ['*.md', '*.yml', '*.yaml', '*.json', 'media/', 'scripts/'] + - '*.md' + - '*.yml' + - '*.yaml' + - '*.json' + - 'media/' + - 'scripts/' # Add 'label2' to any file changes within 'example2' folder status/PTAL: - - any: ['*.*'] \ No newline at end of file + - '*.*' \ No newline at end of file From ecade914ae4e87eea5bc91a743823af1f54dfe32 Mon Sep 17 00:00:00 2001 From: yikeke Date: Mon, 15 Jun 2020 14:50:54 +0800 Subject: [PATCH 7/7] remove ' --- .github/labeler.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index e66d90462c015..5b321fbcd5d9d 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,12 +1,12 @@ # Add 'label1' to any changes within 'example' folder or any subfolders translation/welcome: - - '*.md' - - '*.yml' - - '*.yaml' - - '*.json' - - 'media/' - - 'scripts/' + - *.md + - *.yml + - *.yaml + - *.json + - media/ + - scripts/ # Add 'label2' to any file changes within 'example2' folder status/PTAL: - - '*.*' \ No newline at end of file + - *.* \ No newline at end of file