diff --git a/.github/workflows/pr-regression-labeler.yml b/.github/workflows/issue-regression-labeler.yml similarity index 81% rename from .github/workflows/pr-regression-labeler.yml rename to .github/workflows/issue-regression-labeler.yml index 3cca99fc1af9b..bd000719d101b 100644 --- a/.github/workflows/pr-regression-labeler.yml +++ b/.github/workflows/issue-regression-labeler.yml @@ -1,5 +1,5 @@ -# Apply various labels on PRs -name: pr-regression-labels +# Apply potential regression label on issues +name: issue-regression-label on: issues: types: [opened, edited] @@ -20,14 +20,13 @@ jobs: const regressionPattern = /\[x\] Select this option if this issue appears to be a regression\./i; const template = `${process.env.TEMPLATE_BODY}` const match = regressionPattern.test(template); - console.log(`Is regression: ${match}`); core.setOutput('is_regression', match); - name: Manage regression label env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | if [ "${{ steps.check_regression.outputs.is_regression }}" == "true" ]; then - gh issue edit ${{ github.event.issue.number }} --add-label "potential regression" -R ${{ github.repository }} + gh issue edit ${{ github.event.issue.number }} --add-label "potential-regression" -R ${{ github.repository }} else - gh issue edit ${{ github.event.issue.number }} --remove-label "potential regression" -R ${{ github.repository }} + gh issue edit ${{ github.event.issue.number }} --remove-label "potential-regression" -R ${{ github.repository }} fi