From ce7c8744d3ea9548529c8c628210e62f4b991102 Mon Sep 17 00:00:00 2001 From: shikha372 Date: Wed, 7 Aug 2024 11:37:11 -0700 Subject: [PATCH 1/7] chore(template): adding regression info to bug template --- .github/ISSUE_TEMPLATE/bug-report.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index c3843d23481d8..f3052370e7733 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -20,6 +20,21 @@ body: description: What is the problem? A clear and concise description of the bug. validations: required: true + - type: checkboxes + id: regression + attributes: + label: Regression Issue + description: Select this option if the issue causes any existing functionality to break. + options: + - label: This issue appears to be a regression. + required: false + - type: input + id: working-version + attributes: + label: Last Known Working CDK Version + description: Specify the last known CDK version where this code was functioning as expected (if applicable). + validations: + required: false - type: textarea id: expected attributes: From 6b5a2eff2dffb7d4585ede41b078af4b8cf883a2 Mon Sep 17 00:00:00 2001 From: shikha372 Date: Wed, 7 Aug 2024 15:36:04 -0700 Subject: [PATCH 2/7] adding regression info --- .github/ISSUE_TEMPLATE/bug-report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index f3052370e7733..1fa561f4217fc 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -24,7 +24,7 @@ body: id: regression attributes: label: Regression Issue - description: Select this option if the issue causes any existing functionality to break. + description: Select this option if the issue has caused any existing functionality to break. options: - label: This issue appears to be a regression. required: false From 14e1d186300290ca06ec063aae9b01e0e2209365 Mon Sep 17 00:00:00 2001 From: shikha372 Date: Wed, 7 Aug 2024 15:44:14 -0700 Subject: [PATCH 3/7] adding regression info --- .github/ISSUE_TEMPLATE/bug-report.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index 1fa561f4217fc..700cd18940567 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -24,15 +24,15 @@ body: id: regression attributes: label: Regression Issue - description: Select this option if the issue has caused any existing functionality to break. + description: What is a regression? If it worked in a previous version but doesn’t in the latest version, it’s considered a regression. In this case, Please provide specific version number in the report. options: - - label: This issue appears to be a regression. + - label: Select this option if this issue appears to be a regression. required: false - type: input id: working-version attributes: label: Last Known Working CDK Version - description: Specify the last known CDK version where this code was functioning as expected (if applicable). + description: Specify the last known CDK version where this code was functioning as expected(if applicable). validations: required: false - type: textarea From 840e70a8154e5456bed9d1f9c3a6535854a144ec Mon Sep 17 00:00:00 2001 From: shikha372 Date: Fri, 9 Aug 2024 16:04:07 -0700 Subject: [PATCH 4/7] adding GH workflow to label regression --- .github/workflows/pr-regression-labeler.yml | 33 +++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/pr-regression-labeler.yml diff --git a/.github/workflows/pr-regression-labeler.yml b/.github/workflows/pr-regression-labeler.yml new file mode 100644 index 0000000000000..3cca99fc1af9b --- /dev/null +++ b/.github/workflows/pr-regression-labeler.yml @@ -0,0 +1,33 @@ +# Apply various labels on PRs +name: pr-regression-labels +on: + issues: + types: [opened, edited] +jobs: + add-regression-label: + runs-on: ubuntu-latest + permissions: + issues: write + steps: + - name: Fetch template body + id: check_regression + uses: actions/github-script@v7 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + TEMPLATE_BODY: ${{ github.event.issue.body }} + with: + script: | + 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 }} + else + gh issue edit ${{ github.event.issue.number }} --remove-label "potential regression" -R ${{ github.repository }} + fi From 6b1c3b50057c406b6f3875e40aaafb0118b74231 Mon Sep 17 00:00:00 2001 From: shikha372 Date: Fri, 9 Aug 2024 16:08:52 -0700 Subject: [PATCH 5/7] adding GH workflow to label regression --- ...gression-labeler.yml => issue-regression-labeler.yml} | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) rename .github/workflows/{pr-regression-labeler.yml => issue-regression-labeler.yml} (81%) 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 From 9d1a2eba3b3803e1f6add408d316e6d01a9d8ebe Mon Sep 17 00:00:00 2001 From: shikha372 Date: Mon, 12 Aug 2024 11:59:05 -0700 Subject: [PATCH 6/7] Update .github/ISSUE_TEMPLATE/bug-report.yml Co-authored-by: Grace Luo <54298030+gracelu0@users.noreply.github.com> --- .github/ISSUE_TEMPLATE/bug-report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index 700cd18940567..1bb446cf60d79 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -24,7 +24,7 @@ body: id: regression attributes: label: Regression Issue - description: What is a regression? If it worked in a previous version but doesn’t in the latest version, it’s considered a regression. In this case, Please provide specific version number in the report. + description: What is a regression? If it worked in a previous version but doesn’t in the latest version, it’s considered a regression. In this case, please provide specific version number in the report. options: - label: Select this option if this issue appears to be a regression. required: false From 7b5fa518f06bce3eb1d2caed98bac1a1fc7ff9b7 Mon Sep 17 00:00:00 2001 From: shikha372 Date: Mon, 12 Aug 2024 12:00:38 -0700 Subject: [PATCH 7/7] Update .github/ISSUE_TEMPLATE/bug-report.yml Co-authored-by: Grace Luo <54298030+gracelu0@users.noreply.github.com> --- .github/ISSUE_TEMPLATE/bug-report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index 1bb446cf60d79..7512a919e56fb 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -32,7 +32,7 @@ body: id: working-version attributes: label: Last Known Working CDK Version - description: Specify the last known CDK version where this code was functioning as expected(if applicable). + description: Specify the last known CDK version where this code was functioning as expected (if applicable). validations: required: false - type: textarea