From 334f0f71dfe3fc8d972b7b5f493873b5537f588f Mon Sep 17 00:00:00 2001 From: Sachin Sahu <75629410+SachinSahu431@users.noreply.github.com> Date: Sun, 19 May 2024 15:11:49 +0000 Subject: [PATCH 01/12] Update CONTRIBUTING.md and PR template Signed-off-by: Sachin Sahu <75629410+SachinSahu431@users.noreply.github.com> --- .github/pull-request-template.md | 12 ++++++++++++ CONTRIBUTING.md | 28 ++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 .github/pull-request-template.md diff --git a/.github/pull-request-template.md b/.github/pull-request-template.md new file mode 100644 index 000000000..01ee364d4 --- /dev/null +++ b/.github/pull-request-template.md @@ -0,0 +1,12 @@ +### Describe your PR + + + +### What type of PR is this? + + + +### Changelog Entry +```release-note + +``` diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e015a85cb..61fe33da1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,5 +1,7 @@ # Contributing +Thank you for contributing to our project! Here are the steps and guidelines to follow when creating a pull request (PR). + Prometheus uses GitHub to manage reviews of pull requests. * If you have a trivial fix or improvement, go ahead and create a pull request, @@ -18,3 +20,29 @@ Prometheus uses GitHub to manage reviews of pull requests. Environments](http://peter.bourgon.org/go-in-production/#formatting-and-style). * Be sure to sign off on the [DCO](https://github.com/probot/dco#how-it-works) + +## How to fill the PR template + +### Describe your PR + +In this section, provide a clear and concise description of what your PR does. This helps reviewers understand the purpose and context of your changes. + +### What type of PR is this? + +Indicate the type of PR by adding one of the following options: + +- /kind chore +- /kind cleanup +- /kind fix +- /kind bugfix +- /kind enhancement +- /kind feature +- /kind feat +- /kind docs +- /kind NONE + +If this change should not appear in the changelog, use `/kind NONE`. + +### Changelog Entry + +Include a brief summary of your change for the changelog. This helps users understand what has been modified, added, or fixed in the project. If your change should not appear in the changelog, write `NONE`. Make sure to add only user-facing changes. From bde1c7894e66ed4231404b8416c6512591936259 Mon Sep 17 00:00:00 2001 From: Sachin Sahu <75629410+SachinSahu431@users.noreply.github.com> Date: Sun, 19 May 2024 15:22:47 +0000 Subject: [PATCH 02/12] Add workflow to auto label PRs Signed-off-by: Sachin Sahu <75629410+SachinSahu431@users.noreply.github.com> --- .github/labeler.yml | 45 +++++++++++++++++++++++++++++ .github/workflows/pr-auto-label.yml | 28 ++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 .github/labeler.yml create mode 100644 .github/workflows/pr-auto-label.yml diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 000000000..f6d59601e --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,45 @@ +# Config file for pr-auto-label workflow + +# enable auto-labeler on issues, prs, or both. +enable: + prs: true + +comments: + prs: | + Thanks for the contribution! + I have applied any labels matching special text in your title and description. + + Please review the labels and make any necessary changes. + +# Labels is an object where: +# - keys are labels +# - values are objects of { include: [ pattern ], exclude: [ pattern ] } +# - pattern must be a valid regex, and is applied globally to +# title + description of issues and/or prs (see enabled config above) +# - 'include' patterns will associate a label if any of these patterns match +# - 'exclude' patterns will ignore this label if any of these patterns match +labels: + 'kind/CLEANUP': + include: + - '(/kind (chore|cleanup))|(chore|cleanup):' + exclude: [] + 'kind/BUGFIX': + include: + - '(/kind (fix|bugfix))|(fix|bugfix):' + exclude: [] + 'kind/ENHANCEMENT': + include: + - '(/kind enhancement)|enhancement:' + exclude: [] + 'kind/FEATURE': + include: + - '(/kind (feat|feature))|(feat|feature):' + exclude: [] + 'kind/CHANGE': + include: + - '(/kind docs)|docs:' + exclude: [] + 'release-note-none': + include: + - '(/kind (NONE|release-note-none|release-notes-none))|(NONE|release-note-none|release-notes-none)' + exclude: [] diff --git a/.github/workflows/pr-auto-label.yml b/.github/workflows/pr-auto-label.yml new file mode 100644 index 000000000..916026408 --- /dev/null +++ b/.github/workflows/pr-auto-label.yml @@ -0,0 +1,28 @@ +--- +name: PR-auto-labeler + +on: + pull_request_target: + types: [labeled, unlabeled, opened, edited, synchronize] + +permissions: + # Setting up permissions in the workflow to limit the scope of what it can do. Optional! + contents: read # the config file + issues: write # for labeling issues (on: issues) + pull-requests: write # for labeling pull requests (on: pull_request_target or on: pull_request) + statuses: write # to generate status + checks: write # to generate status + +jobs: + + labeler: + runs-on: ubuntu-latest + + steps: + - name: Check Labels + id: labeler + uses: jimschubert/labeler-action@v1 + with: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + +# Adjust the configuration in /.github/labeler.yml From 98e0b58fc8ebfdbd0960b9186502ade80823521b Mon Sep 17 00:00:00 2001 From: Sachin Sahu <75629410+SachinSahu431@users.noreply.github.com> Date: Mon, 20 May 2024 05:43:06 +0000 Subject: [PATCH 03/12] Revert duplicate changes Signed-off-by: Sachin Sahu <75629410+SachinSahu431@users.noreply.github.com> --- .github/pull-request-template.md | 12 ------------ CONTRIBUTING.md | 30 +----------------------------- 2 files changed, 1 insertion(+), 41 deletions(-) delete mode 100644 .github/pull-request-template.md diff --git a/.github/pull-request-template.md b/.github/pull-request-template.md deleted file mode 100644 index 01ee364d4..000000000 --- a/.github/pull-request-template.md +++ /dev/null @@ -1,12 +0,0 @@ -### Describe your PR - - - -### What type of PR is this? - - - -### Changelog Entry -```release-note - -``` diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 61fe33da1..1f4caec37 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,7 +1,5 @@ # Contributing -Thank you for contributing to our project! Here are the steps and guidelines to follow when creating a pull request (PR). - Prometheus uses GitHub to manage reviews of pull requests. * If you have a trivial fix or improvement, go ahead and create a pull request, @@ -19,30 +17,4 @@ Prometheus uses GitHub to manage reviews of pull requests. Practices for Production Environments](http://peter.bourgon.org/go-in-production/#formatting-and-style). -* Be sure to sign off on the [DCO](https://github.com/probot/dco#how-it-works) - -## How to fill the PR template - -### Describe your PR - -In this section, provide a clear and concise description of what your PR does. This helps reviewers understand the purpose and context of your changes. - -### What type of PR is this? - -Indicate the type of PR by adding one of the following options: - -- /kind chore -- /kind cleanup -- /kind fix -- /kind bugfix -- /kind enhancement -- /kind feature -- /kind feat -- /kind docs -- /kind NONE - -If this change should not appear in the changelog, use `/kind NONE`. - -### Changelog Entry - -Include a brief summary of your change for the changelog. This helps users understand what has been modified, added, or fixed in the project. If your change should not appear in the changelog, write `NONE`. Make sure to add only user-facing changes. +* Be sure to sign off on the [DCO](https://github.com/probot/dco#how-it-works) \ No newline at end of file From 9675ca7fd6c7333acdbe5c601f0f3fc0fd997ae3 Mon Sep 17 00:00:00 2001 From: Sachin Sahu <75629410+SachinSahu431@users.noreply.github.com> Date: Tue, 21 May 2024 11:34:48 +0000 Subject: [PATCH 04/12] Update label config Signed-off-by: Sachin Sahu <75629410+SachinSahu431@users.noreply.github.com> --- .github/labeler.yml | 23 ++++++----------------- .github/workflows/pr-auto-label.yml | 1 - 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index f6d59601e..5ed62570d 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -4,13 +4,6 @@ enable: prs: true -comments: - prs: | - Thanks for the contribution! - I have applied any labels matching special text in your title and description. - - Please review the labels and make any necessary changes. - # Labels is an object where: # - keys are labels # - values are objects of { include: [ pattern ], exclude: [ pattern ] } @@ -19,27 +12,23 @@ comments: # - 'include' patterns will associate a label if any of these patterns match # - 'exclude' patterns will ignore this label if any of these patterns match labels: - 'kind/CLEANUP': - include: - - '(/kind (chore|cleanup))|(chore|cleanup):' - exclude: [] 'kind/BUGFIX': include: - - '(/kind (fix|bugfix))|(fix|bugfix):' + - '/kind (fix|bugfix)' exclude: [] 'kind/ENHANCEMENT': include: - - '(/kind enhancement)|enhancement:' + - '/kind enhancement' exclude: [] 'kind/FEATURE': include: - - '(/kind (feat|feature))|(feat|feature):' + - '/kind (feat|feature)' exclude: [] - 'kind/CHANGE': + 'kind/DOCUMENTATION': include: - - '(/kind docs)|docs:' + - '/kind (docs|documentation)' exclude: [] 'release-note-none': include: - - '(/kind (NONE|release-note-none|release-notes-none))|(NONE|release-note-none|release-notes-none)' + - '/kind (NONE|release-note-none|release-notes-none)' exclude: [] diff --git a/.github/workflows/pr-auto-label.yml b/.github/workflows/pr-auto-label.yml index 916026408..8f395c8cf 100644 --- a/.github/workflows/pr-auto-label.yml +++ b/.github/workflows/pr-auto-label.yml @@ -8,7 +8,6 @@ on: permissions: # Setting up permissions in the workflow to limit the scope of what it can do. Optional! contents: read # the config file - issues: write # for labeling issues (on: issues) pull-requests: write # for labeling pull requests (on: pull_request_target or on: pull_request) statuses: write # to generate status checks: write # to generate status From 37203780203ac14c0879ef5aef3da61b3b2130d9 Mon Sep 17 00:00:00 2001 From: Sachin Sahu <75629410+SachinSahu431@users.noreply.github.com> Date: Wed, 22 May 2024 08:33:54 +0000 Subject: [PATCH 05/12] Enhance regex to handle PR template Signed-off-by: Sachin Sahu <75629410+SachinSahu431@users.noreply.github.com> --- .github/labeler.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index 5ed62570d..d3e9016ac 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -14,21 +14,21 @@ enable: labels: 'kind/BUGFIX': include: - - '/kind (fix|bugfix)' + - '(^|[^\s])/kind (fix|bugfix)' exclude: [] 'kind/ENHANCEMENT': include: - - '/kind enhancement' + - '(^|[^\s])/kind enhancement' exclude: [] 'kind/FEATURE': include: - - '/kind (feat|feature)' + - '(^|[^\s])/kind (feat|feature)' exclude: [] 'kind/DOCUMENTATION': include: - - '/kind (docs|documentation)' + - '(^|[^\s])/kind (doc|docs|documentation)' exclude: [] 'release-note-none': include: - - '/kind (NONE|release-note-none|release-notes-none)' + - '(^|[^\s])/kind (none|NONE|release-note-none|release-notes-none)' exclude: [] From 70d38e24faaf6249522963d6da11ac602519f047 Mon Sep 17 00:00:00 2001 From: Sachin Sahu <75629410+SachinSahu431@users.noreply.github.com> Date: Thu, 23 May 2024 17:46:46 +0530 Subject: [PATCH 06/12] PR template (#42) * Update CONTRIBUTING.md and PR template * Add examples in PR template --------- Signed-off-by: Sachin Sahu <75629410+SachinSahu431@users.noreply.github.com> --- .github/pull-request-template.md | 62 ++++++++++++++++++++++++++++++++ CONTRIBUTING.md | 26 ++++++++++++++ 2 files changed, 88 insertions(+) create mode 100644 .github/pull-request-template.md diff --git a/.github/pull-request-template.md b/.github/pull-request-template.md new file mode 100644 index 000000000..46f597c66 --- /dev/null +++ b/.github/pull-request-template.md @@ -0,0 +1,62 @@ +### Describe your PR + + + + +### What type of PR is this? + + + + +### Changelog Entry +```release-note + +``` + + diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e015a85cb..5e879e1da 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,5 +1,7 @@ # Contributing +Thank you for contributing to our project! Here are the steps and guidelines to follow when creating a pull request (PR). + Prometheus uses GitHub to manage reviews of pull requests. * If you have a trivial fix or improvement, go ahead and create a pull request, @@ -18,3 +20,27 @@ Prometheus uses GitHub to manage reviews of pull requests. Environments](http://peter.bourgon.org/go-in-production/#formatting-and-style). * Be sure to sign off on the [DCO](https://github.com/probot/dco#how-it-works) + +## How to fill the PR template + +### Describe your PR + +In this section, provide a clear and concise description of what your PR does. This helps reviewers understand the purpose and context of your changes. + +### What type of PR is this? + +Indicate the type of PR by adding one of the following options: + +- `/kind fix` +- `/kind bugfix` +- `/kind enhancement` +- `/kind feature` +- `/kind feat` +- `/kind docs` +- `/kind release-note-none` + +If this change should not appear in the changelog, use `/kind release-note-none`. + +### Changelog Entry + +Include a brief summary of your change for the changelog. This helps users understand what has been modified, added, or fixed in the project. If your change should not appear in the changelog, write `NONE`. Make sure to add only user-facing changes. From 33aa5ba75701d27c75648d40c790bb23d7f40915 Mon Sep 17 00:00:00 2001 From: Sachin Sahu <75629410+SachinSahu431@users.noreply.github.com> Date: Thu, 23 May 2024 13:16:44 +0000 Subject: [PATCH 07/12] Test pull_request Signed-off-by: Sachin Sahu <75629410+SachinSahu431@users.noreply.github.com> --- .github/workflows/pr-auto-label.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-auto-label.yml b/.github/workflows/pr-auto-label.yml index 8f395c8cf..04deeaea5 100644 --- a/.github/workflows/pr-auto-label.yml +++ b/.github/workflows/pr-auto-label.yml @@ -2,7 +2,7 @@ name: PR-auto-labeler on: - pull_request_target: + pull_request: types: [labeled, unlabeled, opened, edited, synchronize] permissions: From 79812ee7f750628d007f63995e84c0448641c43f Mon Sep 17 00:00:00 2001 From: Sachin Sahu <75629410+SachinSahu431@users.noreply.github.com> Date: Sun, 26 May 2024 10:55:18 +0000 Subject: [PATCH 08/12] Remove duplicate files Signed-off-by: Sachin Sahu <75629410+SachinSahu431@users.noreply.github.com> --- .github/pull-request-template.md | 62 -------------------------------- CONTRIBUTING.md | 28 +-------------- 2 files changed, 1 insertion(+), 89 deletions(-) delete mode 100644 .github/pull-request-template.md diff --git a/.github/pull-request-template.md b/.github/pull-request-template.md deleted file mode 100644 index 46f597c66..000000000 --- a/.github/pull-request-template.md +++ /dev/null @@ -1,62 +0,0 @@ -### Describe your PR - - - - -### What type of PR is this? - - - - -### Changelog Entry -```release-note - -``` - - diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5e879e1da..1f4caec37 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,7 +1,5 @@ # Contributing -Thank you for contributing to our project! Here are the steps and guidelines to follow when creating a pull request (PR). - Prometheus uses GitHub to manage reviews of pull requests. * If you have a trivial fix or improvement, go ahead and create a pull request, @@ -19,28 +17,4 @@ Prometheus uses GitHub to manage reviews of pull requests. Practices for Production Environments](http://peter.bourgon.org/go-in-production/#formatting-and-style). -* Be sure to sign off on the [DCO](https://github.com/probot/dco#how-it-works) - -## How to fill the PR template - -### Describe your PR - -In this section, provide a clear and concise description of what your PR does. This helps reviewers understand the purpose and context of your changes. - -### What type of PR is this? - -Indicate the type of PR by adding one of the following options: - -- `/kind fix` -- `/kind bugfix` -- `/kind enhancement` -- `/kind feature` -- `/kind feat` -- `/kind docs` -- `/kind release-note-none` - -If this change should not appear in the changelog, use `/kind release-note-none`. - -### Changelog Entry - -Include a brief summary of your change for the changelog. This helps users understand what has been modified, added, or fixed in the project. If your change should not appear in the changelog, write `NONE`. Make sure to add only user-facing changes. +* Be sure to sign off on the [DCO](https://github.com/probot/dco#how-it-works) \ No newline at end of file From 9a8e3447b6b6c748a41c369ab1b5d72590737791 Mon Sep 17 00:00:00 2001 From: Sachin Sahu <75629410+SachinSahu431@users.noreply.github.com> Date: Sun, 26 May 2024 10:58:34 +0000 Subject: [PATCH 09/12] Add 'CHANGE' kind Signed-off-by: Sachin Sahu <75629410+SachinSahu431@users.noreply.github.com> --- .github/labeler.yml | 12 ++++++------ .github/workflows/pr-auto-label.yml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index d3e9016ac..925d16100 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -14,21 +14,21 @@ enable: labels: 'kind/BUGFIX': include: - - '(^|[^\s])/kind (fix|bugfix)' + - '/kind (fix|bugfix)' exclude: [] 'kind/ENHANCEMENT': include: - - '(^|[^\s])/kind enhancement' + - '/kind enhancement' exclude: [] 'kind/FEATURE': include: - - '(^|[^\s])/kind (feat|feature)' + - '/kind (feat|feature)' exclude: [] - 'kind/DOCUMENTATION': + 'kind/CHANGE': include: - - '(^|[^\s])/kind (doc|docs|documentation)' + - '/kind change' exclude: [] 'release-note-none': include: - - '(^|[^\s])/kind (none|NONE|release-note-none|release-notes-none)' + - '/kind (none|NONE|release-note-none|release-notes-none)' exclude: [] diff --git a/.github/workflows/pr-auto-label.yml b/.github/workflows/pr-auto-label.yml index 04deeaea5..8f395c8cf 100644 --- a/.github/workflows/pr-auto-label.yml +++ b/.github/workflows/pr-auto-label.yml @@ -2,7 +2,7 @@ name: PR-auto-labeler on: - pull_request: + pull_request_target: types: [labeled, unlabeled, opened, edited, synchronize] permissions: From 269fb49735f68ccc11ed7f752809191bcef53890 Mon Sep 17 00:00:00 2001 From: Sachin Sahu <75629410+SachinSahu431@users.noreply.github.com> Date: Sun, 26 May 2024 18:28:17 +0000 Subject: [PATCH 10/12] Add comment if labeler workflow fails Signed-off-by: Sachin Sahu <75629410+SachinSahu431@users.noreply.github.com> --- .github/workflows/pr-auto-label.yml | 42 ++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 10 deletions(-) diff --git a/.github/workflows/pr-auto-label.yml b/.github/workflows/pr-auto-label.yml index 8f395c8cf..c71ce9ea8 100644 --- a/.github/workflows/pr-auto-label.yml +++ b/.github/workflows/pr-auto-label.yml @@ -1,27 +1,49 @@ --- name: PR-auto-labeler -on: +on: pull_request_target: types: [labeled, unlabeled, opened, edited, synchronize] permissions: - # Setting up permissions in the workflow to limit the scope of what it can do. Optional! contents: read # the config file pull-requests: write # for labeling pull requests (on: pull_request_target or on: pull_request) statuses: write # to generate status checks: write # to generate status - -jobs: +jobs: labeler: runs-on: ubuntu-latest + steps: + - name: Check Labels + id: labeler + uses: jimschubert/labeler-action@v1 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + validate: + runs-on: ubuntu-latest steps: - - name: Check Labels - id: labeler - uses: jimschubert/labeler-action@v1 - with: - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + - uses: actions/checkout@v4 + - name: Fetch PR Body + id: fetch_body + run: | + body=$(curl -sSL -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.number }} | jq -r '.body') + echo "BODY<> $GITHUB_ENV + echo "$body" >> $GITHUB_ENV + echo "EOF" >> $GITHUB_ENV + - name: Check for labels in PR body + run: | + if [[ $(cat < Date: Wed, 29 May 2024 15:10:34 +0530 Subject: [PATCH 11/12] Modify PR-label validation workflow Signed-off-by: Sachin Sahu --- .github/workflows/pr-auto-label.yml | 64 ++++++++++++++++------------- 1 file changed, 36 insertions(+), 28 deletions(-) diff --git a/.github/workflows/pr-auto-label.yml b/.github/workflows/pr-auto-label.yml index c71ce9ea8..24b198ea6 100644 --- a/.github/workflows/pr-auto-label.yml +++ b/.github/workflows/pr-auto-label.yml @@ -3,16 +3,16 @@ name: PR-auto-labeler on: pull_request_target: - types: [labeled, unlabeled, opened, edited, synchronize] + types: [opened, edited, synchronize] permissions: - contents: read # the config file - pull-requests: write # for labeling pull requests (on: pull_request_target or on: pull_request) - statuses: write # to generate status - checks: write # to generate status + contents: read # the config file + pull-requests: write # for labeling pull requests (on: pull_request_target or on: pull_request) + statuses: write # to generate status + checks: write # to generate status jobs: - labeler: + pr-labeler: runs-on: ubuntu-latest steps: - name: Check Labels @@ -20,30 +20,38 @@ jobs: uses: jimschubert/labeler-action@v1 with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +# Adjust the configuration in /.github/labeler.yml - validate: + validate-pr-label: runs-on: ubuntu-latest + needs: pr-labeler steps: - - uses: actions/checkout@v4 - - name: Fetch PR Body - id: fetch_body - run: | - body=$(curl -sSL -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.number }} | jq -r '.body') - echo "BODY<> $GITHUB_ENV - echo "$body" >> $GITHUB_ENV - echo "EOF" >> $GITHUB_ENV - - name: Check for labels in PR body + - name: Verify Label + id: preview_label_check + uses: docker://agilepathway/pull-request-label-checker:latest + with: + any_of: kind/BUGFIX,kind/ENHANCEMENT,kind/FEATURE,kind/CHANGE,release-note-none + repo_token: ${{ secrets.GITHUB_TOKEN }} + allow_failure: true + - name: Comment on Label Check Failure + uses: thollander/actions-comment-pull-request@v2.5.0 + if: steps.preview_label_check.outputs.label_check == 'failure' + with: + message: | + PR body does not contain a valid type of change. Please refer to [CONTRIBUTING.md](https://github.com/prometheus/client_golang/blob/main/CONTRIBUTING.md#how-to-fill-the-pr-template) for more information. + comment_tag: labelfailure + mode: recreate + - name: Remove Label Check Failure Comment + uses: thollander/actions-comment-pull-request@v2.5.0 + if: steps.preview_label_check.outputs.label_check == 'success' + with: + message: | + PR body contains a valid type of change. + comment_tag: labelfailure + mode: delete + create_if_not_exists: false + - name: Exit on Failure run: | - if [[ $(cat < Date: Thu, 30 May 2024 19:16:49 +0530 Subject: [PATCH 12/12] Update .github/workflows/pr-auto-label.yml Co-authored-by: Arthur Silva Sens Signed-off-by: Sachin Sahu <75629410+SachinSahu431@users.noreply.github.com> --- .github/workflows/pr-auto-label.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pr-auto-label.yml b/.github/workflows/pr-auto-label.yml index 24b198ea6..6d80b9561 100644 --- a/.github/workflows/pr-auto-label.yml +++ b/.github/workflows/pr-auto-label.yml @@ -51,7 +51,5 @@ jobs: mode: delete create_if_not_exists: false - name: Exit on Failure - run: | - if [[ ${{ steps.preview_label_check.outputs.label_check }} == 'failure' ]]; then - exit 1 - fi + if: steps.preview_label_check.outputs.label_check == 'failure' + run: exit 1