From 8e1875c4c85e6f9357b1d5a6ee3849cb839b31de Mon Sep 17 00:00:00 2001 From: Oleg Zharkov Date: Tue, 1 Dec 2020 14:58:08 +0100 Subject: [PATCH 1/6] fix label checker issue --- .github/workflows/labels-verifier.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/labels-verifier.yaml b/.github/workflows/labels-verifier.yaml index ff18d92421e..35f228d109c 100644 --- a/.github/workflows/labels-verifier.yaml +++ b/.github/workflows/labels-verifier.yaml @@ -1,6 +1,6 @@ name: "Labels Verifier" on: - pull_request: + pull_request_target: types: [closed] jobs: @@ -11,10 +11,10 @@ jobs: - name: Check Labels on merge if: | github.event.pull_request.merged == true && - contains(github.event.pull_request.labels.*.name, 'kind/') == false + contains(join(github.event.pull_request.labels.*.name, ', '), 'kind/') == false uses: actions/github-script@0.3.0 with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | const { issue: { number: issue_number }, repo: { owner, repo } } = context; - github.issues.createComment({ issue_number, owner, repo, body: 'This PR was merged without a "kind/" label, please correct.' }) \ No newline at end of file + github.issues.createComment({ issue_number, owner, repo, body: 'This PR was merged without a "kind/" label, please correct.' }) \ No newline at end of file From abd86ddf1c9cffb9ff9863180c27f97e5259f349 Mon Sep 17 00:00:00 2001 From: Oleg Zharkov Date: Tue, 1 Dec 2020 17:29:35 +0100 Subject: [PATCH 2/6] update labels yml --- .github/labeler.yml | 4 ++++ .github/workflows/labels-verifier.yaml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index 76d0f600a5e..4e807052bcd 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -9,6 +9,8 @@ area/datatypes: - lib/galaxy/config/sample/datatypes_conf.xml.sample area/documentation: - doc/**/* +area/jobs: + - lib/galaxy/jobs/**/* area/libraries: - client/src/components/LibraryFolder/**/* - lib/galaxy/webapps/galaxy/api/libraries.py @@ -23,7 +25,9 @@ area/testing/selenium: area/tools: - tools/**/* - lib/galaxy/webapps/galaxy/api/tools.py + - lib/galaxy/tools/**/* - tool-data/**/* + - lib/galaxy/tool_util/**/* area/toolshed: - client/src/toolshed/**/* - lib/galaxy/webapps/galaxy/api/toolshed.py diff --git a/.github/workflows/labels-verifier.yaml b/.github/workflows/labels-verifier.yaml index 35f228d109c..9557d22b746 100644 --- a/.github/workflows/labels-verifier.yaml +++ b/.github/workflows/labels-verifier.yaml @@ -17,4 +17,4 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} script: | const { issue: { number: issue_number }, repo: { owner, repo } } = context; - github.issues.createComment({ issue_number, owner, repo, body: 'This PR was merged without a "kind/" label, please correct.' }) \ No newline at end of file + github.issues.createComment({ issue_number, owner, repo, body: 'This PR was merged without a "kind/" label, please correct.' }) \ No newline at end of file From 05969e0f9ccb22df25a1b726404f0232f00e0dc3 Mon Sep 17 00:00:00 2001 From: Nicola Soranzo Date: Tue, 1 Dec 2020 18:35:41 +0000 Subject: [PATCH 3/6] Add more labels and directories --- .github/labeler.yml | 47 ++++++++++++++++++++++++++++++++++++++------- 1 file changed, 40 insertions(+), 7 deletions(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index 4e807052bcd..71b2fc34305 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,12 +1,16 @@ --- area/admin: - client/src/components/admin/**/* - - doc/source/admin + - doc/source/admin/**/* +area/API: + - lib/galaxy/webapps/galaxy/api/**/* area/client: - - client/**/* + - client/* area/datatypes: - lib/galaxy/datatypes/**/* - lib/galaxy/config/sample/datatypes_conf.xml.sample +area/dependencies: + - lib/galaxy/dependencies/**/* area/documentation: - doc/**/* area/jobs: @@ -14,22 +18,51 @@ area/jobs: area/libraries: - client/src/components/LibraryFolder/**/* - lib/galaxy/webapps/galaxy/api/libraries.py +area/objectstore: + - lib/galaxy/objectstore/**/* +area/packaging: + - packages/**/* +area/reports: + - client/src/reports/**/* + - lib/galaxy/webapps/reports/**/* + - templates/webapps/reports/**/* +area/scripts: + - scripts/**/* +area/security: + - lib/galaxy/security/**/* area/testing: + - lib/galaxy_test/**/* + - run_tests.sh - test/**/* - test-data/**/* - - lib/galaxy/tools/test.py - - run_tests.sh +area/testing/api: + - lib/galaxy_test/api/**/* +area/testing/integration: + - test/integration/**/* + - test/integration_selenium/**/* area/testing/selenium: - lib/galaxy/selenium/**/* - lib/galaxy_test/selenium/**/* +area/tool-dependencies: + - lib/galaxy/tool_util/deps/**/* +area/tool-framework: + - lib/galaxy/tools/**/* + - lib/galaxy/tool_util/**/* + - lib/galaxy/webapps/galaxy/api/tools.py area/tools: - tools/**/* - - lib/galaxy/webapps/galaxy/api/tools.py - - lib/galaxy/tools/**/* - tool-data/**/* - - lib/galaxy/tool_util/**/* area/toolshed: - client/src/toolshed/**/* - lib/galaxy/webapps/galaxy/api/toolshed.py + - lib/toolshed/**/* + - templates/webapps/tool_shed/**/* +area/UI-UX: + - client/src/**/* + - templates/**/* +area/util: + - lib/galaxy/util/**/* area/visualizations: - config/plugins/visualizations/**/* +area/workflows: + - lib/galaxy/workflow/**/* From a57fcf3906d7d8079022aa0cdf4d84d3b5f33b34 Mon Sep 17 00:00:00 2001 From: Nicola Soranzo Date: Wed, 2 Dec 2020 02:51:01 +0000 Subject: [PATCH 4/6] More conditions for adding the milestone - Don't change the milestone if one is already set or if the PR is labelled `status/WIP`. - Merge the 2 jobs into 1 - Move the `MILESTONE_NUMBER` env variable to job level - Fixes --- .github/workflows/maintainance_bot.yaml | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/.github/workflows/maintainance_bot.yaml b/.github/workflows/maintainance_bot.yaml index 73dd02d2e32..9768b0500d4 100644 --- a/.github/workflows/maintainance_bot.yaml +++ b/.github/workflows/maintainance_bot.yaml @@ -4,26 +4,23 @@ on: jobs: labeler: - name: "Assign Labels" + name: Assign labels and milestone runs-on: ubuntu-latest + env: + MILESTONE_NUMBER: 18 steps: - uses: actions/labeler@main with: repo-token: "${{ secrets.GITHUB_TOKEN }}" - - milestone: - name: "Assign Milestone" - runs-on: ubuntu-latest - steps: - - name: Assign Milestone - if: | - contains(github.event.pull_request.title, 'WIP') == false && - contains(github.event.pull_request.title, 'merge') == false && - github.event.pull_request.draft == false - env: - MILESTONE_NUMBER: 18 + - name: Assign milestone + if: | + ! github.event.pull_request.milestone && + ! contains(github.event.pull_request.labels.*.name, 'merge') && + ! contains(github.event.pull_request.labels.*.name, 'status/WIP') && + ! contains(github.event.pull_request.title, 'WIP') && + ! github.event.pull_request.draft run: | curl --request PATCH \ --url ${{ github.event.pull_request.issue_url }} \ --header 'authorization: token ${{ secrets.GITHUB_TOKEN }}' \ - --data-raw '{"milestone": '$MILESTONE_NUMBER'}' \ No newline at end of file + --data-raw '{"milestone": '$MILESTONE_NUMBER'}' From 7f60a7a0213ccf7b9e88e1fde149ff4c5e18045d Mon Sep 17 00:00:00 2001 From: Oleg Zharkov Date: Wed, 2 Dec 2020 13:58:15 +0100 Subject: [PATCH 5/6] use negation operator in labels-verifier --- .github/workflows/labels-verifier.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/labels-verifier.yaml b/.github/workflows/labels-verifier.yaml index 9557d22b746..be76ccb9b30 100644 --- a/.github/workflows/labels-verifier.yaml +++ b/.github/workflows/labels-verifier.yaml @@ -11,7 +11,7 @@ jobs: - name: Check Labels on merge if: | github.event.pull_request.merged == true && - contains(join(github.event.pull_request.labels.*.name, ', '), 'kind/') == false + ! contains(join(github.event.pull_request.labels.*.name, ', '), 'kind/') uses: actions/github-script@0.3.0 with: github-token: ${{ secrets.GITHUB_TOKEN }} From 681c8a0a6f2fa4b8443d721fc2c22ea57cdcee2b Mon Sep 17 00:00:00 2001 From: Nicola Soranzo Date: Wed, 2 Dec 2020 13:27:18 +0000 Subject: [PATCH 6/6] Skip PR labeled with `merge` --- .github/workflows/labels-verifier.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/labels-verifier.yaml b/.github/workflows/labels-verifier.yaml index be76ccb9b30..8cca5f52ea5 100644 --- a/.github/workflows/labels-verifier.yaml +++ b/.github/workflows/labels-verifier.yaml @@ -11,10 +11,11 @@ jobs: - name: Check Labels on merge if: | github.event.pull_request.merged == true && - ! contains(join(github.event.pull_request.labels.*.name, ', '), 'kind/') + ! contains(join(github.event.pull_request.labels.*.name, ', '), 'kind/') && + ! contains(github.event.pull_request.labels.*.name, 'merge') uses: actions/github-script@0.3.0 with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | const { issue: { number: issue_number }, repo: { owner, repo } } = context; - github.issues.createComment({ issue_number, owner, repo, body: 'This PR was merged without a "kind/" label, please correct.' }) \ No newline at end of file + github.issues.createComment({ issue_number, owner, repo, body: 'This PR was merged without a "kind/" label, please correct.' })