From 67e9e957779e1e35a5917f9e7e5b8c77e13ec847 Mon Sep 17 00:00:00 2001 From: Ran Date: Thu, 21 May 2020 17:54:16 +0800 Subject: [PATCH 1/5] add missing `=` operator --- .github/workflows/assign_sig_project.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/assign_sig_project.yml b/.github/workflows/assign_sig_project.yml index d73dc28d5e752..09475d30e0a3d 100644 --- a/.github/workflows/assign_sig_project.yml +++ b/.github/workflows/assign_sig_project.yml @@ -16,21 +16,21 @@ jobs: - name: Assign Open Issue uses: srggrs/assign-one-project-github-action@1.2.0 if: | - github.event.action == 'opened' && github.event = 'issue' + github.event.action == 'opened' && github.event == 'issue' with: project: 'https://github.com/pingcap/docs/projects/1' column_name: 'Issue: Backlog' - name: Assign Closed Issue uses: srggrs/assign-one-project-github-action@1.2.0 if: | - github.event.action == 'closed' && github.event = 'issue' + github.event.action == 'closed' && github.event == 'issue' with: project: 'https://github.com/pingcap/docs/projects/1' column_name: 'Issue: Resolved' - name: Assign Open PR uses: srggrs/assign-one-project-github-action@1.2.0 if: | - github.event.action == 'opened' && github.event = 'pull_request' + github.event.action == 'opened' && github.event == 'pull_request' with: project: 'https://github.com/pingcap/docs/projects/1' column_name: 'PR: In Progress' @@ -38,7 +38,7 @@ jobs: uses: srggrs/assign-one-project-github-action@1.2.0 if: | github.event.action == 'closed' && - github.event = 'pull_request' && + github.event == 'pull_request' && ! contains(github.event.pull_request.labels.*.name, 'translation/welcome') with: project: 'https://github.com/pingcap/docs/projects/1' From fc5f1a6523bec581f0d7f46ba8127571bbdb33be Mon Sep 17 00:00:00 2001 From: Ran Date: Thu, 21 May 2020 23:47:07 +0800 Subject: [PATCH 2/5] Update assign_sig_project.yml --- .github/workflows/assign_sig_project.yml | 31 ++++++------------------ 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/.github/workflows/assign_sig_project.yml b/.github/workflows/assign_sig_project.yml index 09475d30e0a3d..a9f95ce3b34fd 100644 --- a/.github/workflows/assign_sig_project.yml +++ b/.github/workflows/assign_sig_project.yml @@ -2,9 +2,9 @@ name: Auto Assign to Project on: issues: - types: [opened, labeled, closed] + types: [opened, labeled] pull_request: - types: [opened, labeled, unlabeled, closed] + types: [opened, labeled] env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -16,37 +16,22 @@ jobs: - name: Assign Open Issue uses: srggrs/assign-one-project-github-action@1.2.0 if: | - github.event.action == 'opened' && github.event == 'issue' + github.event.action == 'opened' && github.event_name == 'issue' with: project: 'https://github.com/pingcap/docs/projects/1' column_name: 'Issue: Backlog' - - name: Assign Closed Issue - uses: srggrs/assign-one-project-github-action@1.2.0 - if: | - github.event.action == 'closed' && github.event == 'issue' - with: - project: 'https://github.com/pingcap/docs/projects/1' - column_name: 'Issue: Resolved' - name: Assign Open PR uses: srggrs/assign-one-project-github-action@1.2.0 if: | - github.event.action == 'opened' && github.event == 'pull_request' + github.event.action == 'opened' && github.event_name == 'pull_request' with: project: 'https://github.com/pingcap/docs/projects/1' column_name: 'PR: In Progress' - - name: Assign Closed PR - uses: srggrs/assign-one-project-github-action@1.2.0 - if: | - github.event.action == 'closed' && - github.event == 'pull_request' && - ! contains(github.event.pull_request.labels.*.name, 'translation/welcome') - with: - project: 'https://github.com/pingcap/docs/projects/1' - column_name: 'PR: Done' - name: Assign Translation/Welcome PR uses: srggrs/assign-one-project-github-action@1.2.0 if: | - contains(github.event.pull_request.labels.*.name, 'translation/welcome') + contains(github.event.pull_request.labels.*.name, 'translation/welcome') || + contains(github.event.issue.labels.*.name, 'translation/welcome') || with: - project: 'https://github.com/pingcap/docs/projects/1' - column_name: 'Translation/Welcome' + project: 'https://github.com/pingcap/docs/projects/2' + column_name: 'To do' From a27d4260b3212fc2521069646dd9c90a4c48101d Mon Sep 17 00:00:00 2001 From: Ran Date: Thu, 21 May 2020 23:58:08 +0800 Subject: [PATCH 3/5] update workflow --- .github/workflows/add-docs-sig-issue.yml | 19 ++++++++++++ .github/workflows/add-docs-sig-pr.yml | 19 ++++++++++++ .github/workflows/assign_sig_project.yml | 37 ----------------------- .github/workflows/translation-welcome.yml | 23 ++++++++++++++ 4 files changed, 61 insertions(+), 37 deletions(-) create mode 100644 .github/workflows/add-docs-sig-issue.yml create mode 100644 .github/workflows/add-docs-sig-pr.yml delete mode 100644 .github/workflows/assign_sig_project.yml create mode 100644 .github/workflows/translation-welcome.yml diff --git a/.github/workflows/add-docs-sig-issue.yml b/.github/workflows/add-docs-sig-issue.yml new file mode 100644 index 0000000000000..8991074314e6e --- /dev/null +++ b/.github/workflows/add-docs-sig-issue.yml @@ -0,0 +1,19 @@ +name: Auto Assign to Project + +on: + issues: + types: [opened] +env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + +jobs: + assign_one_project: + runs-on: ubuntu-latest + name: Assign to Docs SIG Project + steps: + - name: Assign NEW issues to Docs SIG project + uses: srggrs/assign-one-project-github-action@1.2.0 + if: github.event.action == 'opened' + with: + project: 'https://github.com/pingcap/docs/projects/1' + column_name: 'Issue: Backlog' diff --git a/.github/workflows/add-docs-sig-pr.yml b/.github/workflows/add-docs-sig-pr.yml new file mode 100644 index 0000000000000..08b2cdc915409 --- /dev/null +++ b/.github/workflows/add-docs-sig-pr.yml @@ -0,0 +1,19 @@ +name: Auto Assign to Project + +on: + pull_request: + types: [opened] +env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + +jobs: + assign_one_project: + runs-on: ubuntu-latest + name: Assign to Docs SIG Project + steps: + - name: Assign NEW pull requests to Docs SIG project + uses: srggrs/assign-one-project-github-action@1.2.0 + if: github.event.action == 'opened' + with: + project: 'https://github.com/pingcap/docs/projects/1' + column_name: 'PR: In Progress' diff --git a/.github/workflows/assign_sig_project.yml b/.github/workflows/assign_sig_project.yml deleted file mode 100644 index a9f95ce3b34fd..0000000000000 --- a/.github/workflows/assign_sig_project.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Auto Assign to Project - -on: - issues: - types: [opened, labeled] - pull_request: - types: [opened, labeled] -env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - -jobs: - assign_one_project: - runs-on: ubuntu-latest - name: Assign to Docs SIG Project - steps: - - name: Assign Open Issue - uses: srggrs/assign-one-project-github-action@1.2.0 - if: | - github.event.action == 'opened' && github.event_name == 'issue' - with: - project: 'https://github.com/pingcap/docs/projects/1' - column_name: 'Issue: Backlog' - - name: Assign Open PR - uses: srggrs/assign-one-project-github-action@1.2.0 - if: | - github.event.action == 'opened' && github.event_name == 'pull_request' - with: - project: 'https://github.com/pingcap/docs/projects/1' - column_name: 'PR: In Progress' - - name: Assign Translation/Welcome PR - uses: srggrs/assign-one-project-github-action@1.2.0 - if: | - contains(github.event.pull_request.labels.*.name, 'translation/welcome') || - contains(github.event.issue.labels.*.name, 'translation/welcome') || - with: - project: 'https://github.com/pingcap/docs/projects/2' - column_name: 'To do' diff --git a/.github/workflows/translation-welcome.yml b/.github/workflows/translation-welcome.yml new file mode 100644 index 0000000000000..22fab56d04570 --- /dev/null +++ b/.github/workflows/translation-welcome.yml @@ -0,0 +1,23 @@ +name: Translation Welcome + +on: + issues: + types: [unlabeled, labeled] + pull_request: + types: [unlabeled, labeled] +env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + +jobs: + assign_one_project: + runs-on: ubuntu-latest + name: Auto Add to Project + steps: + - name: Add translation-welcome PRs/Issues to Project + uses: srggrs/assign-one-project-github-action@1.2.0 + if: | + contains(github.event.issue.labels.*.name, 'translation/welcome') || + contains(github.event.pull_request.labels.*.name, 'translation/welcome') + with: + project: 'https://github.com/pingcap/docs/projects/2' + column_name: 'To do' From 3a06eeee9622a85fccaa25a5c72fa21872af3fae Mon Sep 17 00:00:00 2001 From: Ran Date: Fri, 22 May 2020 09:14:30 +0800 Subject: [PATCH 4/5] merge three ci into one --- .github/workflows/add-docs-sig-issue.yml | 19 ----------- .github/workflows/add-docs-sig-pr.yml | 19 ----------- .github/workflows/assign-to-project.yml | 39 +++++++++++++++++++++++ .github/workflows/translation-welcome.yml | 23 ------------- 4 files changed, 39 insertions(+), 61 deletions(-) delete mode 100644 .github/workflows/add-docs-sig-issue.yml delete mode 100644 .github/workflows/add-docs-sig-pr.yml create mode 100644 .github/workflows/assign-to-project.yml delete mode 100644 .github/workflows/translation-welcome.yml diff --git a/.github/workflows/add-docs-sig-issue.yml b/.github/workflows/add-docs-sig-issue.yml deleted file mode 100644 index 8991074314e6e..0000000000000 --- a/.github/workflows/add-docs-sig-issue.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Auto Assign to Project - -on: - issues: - types: [opened] -env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - -jobs: - assign_one_project: - runs-on: ubuntu-latest - name: Assign to Docs SIG Project - steps: - - name: Assign NEW issues to Docs SIG project - uses: srggrs/assign-one-project-github-action@1.2.0 - if: github.event.action == 'opened' - with: - project: 'https://github.com/pingcap/docs/projects/1' - column_name: 'Issue: Backlog' diff --git a/.github/workflows/add-docs-sig-pr.yml b/.github/workflows/add-docs-sig-pr.yml deleted file mode 100644 index 08b2cdc915409..0000000000000 --- a/.github/workflows/add-docs-sig-pr.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Auto Assign to Project - -on: - pull_request: - types: [opened] -env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - -jobs: - assign_one_project: - runs-on: ubuntu-latest - name: Assign to Docs SIG Project - steps: - - name: Assign NEW pull requests to Docs SIG project - uses: srggrs/assign-one-project-github-action@1.2.0 - if: github.event.action == 'opened' - with: - project: 'https://github.com/pingcap/docs/projects/1' - column_name: 'PR: In Progress' diff --git a/.github/workflows/assign-to-project.yml b/.github/workflows/assign-to-project.yml new file mode 100644 index 0000000000000..d99121f4f5fc0 --- /dev/null +++ b/.github/workflows/assign-to-project.yml @@ -0,0 +1,39 @@ +name: Assign to Project + +on: + issues: + types: [opened, labeled] + pull_request: + types: [opened, labeled] +env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + +jobs: + assign_one_project: + runs-on: ubuntu-latest + name: Assign to Project + steps: + - name: Assign NEW issues to Docs SIG project + uses: srggrs/assign-one-project-github-action@1.2.0 + if: | + github.event_name == 'issues' && + github.event.action == 'opened' + with: + project: 'https://github.com/pingcap/docs/projects/1' + column_name: 'Issue: Backlog' + - name: Assign NEW pull requests to Docs SIG project + uses: srggrs/assign-one-project-github-action@1.2.0 + if: | + github.event_name == 'pull_request' && + github.event.action == 'opened' + with: + project: 'https://github.com/pingcap/docs/projects/1' + column_name: 'PR: In Progress' + - name: Assign issues or PRs with translation-welcome label + uses: srggrs/assign-one-project-github-action@1.2.0 + if: | + contains(github.event.issue.labels.*.name, 'translation/welcome') || + contains(github.event.pull_request.labels.*.name, 'translation/welcome') + with: + project: 'https://github.com/pingcap/docs/projects/2' + column_name: 'To do' \ No newline at end of file diff --git a/.github/workflows/translation-welcome.yml b/.github/workflows/translation-welcome.yml deleted file mode 100644 index 22fab56d04570..0000000000000 --- a/.github/workflows/translation-welcome.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Translation Welcome - -on: - issues: - types: [unlabeled, labeled] - pull_request: - types: [unlabeled, labeled] -env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - -jobs: - assign_one_project: - runs-on: ubuntu-latest - name: Auto Add to Project - steps: - - name: Add translation-welcome PRs/Issues to Project - uses: srggrs/assign-one-project-github-action@1.2.0 - if: | - contains(github.event.issue.labels.*.name, 'translation/welcome') || - contains(github.event.pull_request.labels.*.name, 'translation/welcome') - with: - project: 'https://github.com/pingcap/docs/projects/2' - column_name: 'To do' From 8d6471c1f1a379d47ab36f8f217e32e9ff3fd68e Mon Sep 17 00:00:00 2001 From: Ran Date: Fri, 22 May 2020 09:19:17 +0800 Subject: [PATCH 5/5] update format --- .github/workflows/assign-to-project.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/assign-to-project.yml b/.github/workflows/assign-to-project.yml index d99121f4f5fc0..4c31e1b09d5b8 100644 --- a/.github/workflows/assign-to-project.yml +++ b/.github/workflows/assign-to-project.yml @@ -36,4 +36,4 @@ jobs: contains(github.event.pull_request.labels.*.name, 'translation/welcome') with: project: 'https://github.com/pingcap/docs/projects/2' - column_name: 'To do' \ No newline at end of file + column_name: 'To do'