From 0509360581777468489e55a1943ba1de8c7dd5c7 Mon Sep 17 00:00:00 2001 From: Alex Boten Date: Fri, 15 Jul 2022 09:32:18 -0700 Subject: [PATCH] skip changelog for [chore] prs (#5676) * skip changelog for [chore] prs Add a check in the changelog job to skip the job if the title of the PR contains [chore]. This makes it possible for a user who's change doesn't require a changelog entry and doesn't have write access to the repository to skip this check. For now I've left the check for the "Skip Changelog" label as well, in the future, this should be removed and the label can be removed altogether. * Update .github/workflows/changelog.yml Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> --- .github/workflows/changelog.yml | 4 ++-- .github/workflows/scripts/dependabot-pr.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 70fb482d600..ebc37f6a623 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -12,7 +12,7 @@ on: jobs: changelog: runs-on: ubuntu-latest - if: ${{ !contains(github.event.pull_request.labels.*.name, 'dependencies') && !contains(github.event.pull_request.labels.*.name, 'Skip Changelog')}} + if: ${{ !contains(github.event.pull_request.labels.*.name, 'dependencies') && !contains(github.event.pull_request.labels.*.name, 'Skip Changelog') && !contains(github.event.pull_request.title, '[chore]')}} steps: - uses: actions/checkout@v3 @@ -28,6 +28,6 @@ jobs: echo "A CHANGELOG was modified. Looks good!" else echo "No CHANGELOG was modified." - echo "Please add a CHANGELOG entry, or add the \"Skip Changelog\" label if not required." + echo "Please add a CHANGELOG entry, or add either \"[chore]\" to the title of the pull request or add the \"Skip Changelog\" label if not required." false fi diff --git a/.github/workflows/scripts/dependabot-pr.sh b/.github/workflows/scripts/dependabot-pr.sh index 0d6daa35815..8ab0fcab931 100755 --- a/.github/workflows/scripts/dependabot-pr.sh +++ b/.github/workflows/scripts/dependabot-pr.sh @@ -41,4 +41,4 @@ git commit -m "dependabot updates `date` $message" git push origin $PR_NAME -gh pr create --title "dependabot updates `date`" --body "$message" -l "Skip Changelog" +gh pr create --title "[chore] dependabot updates `date`" --body "$message" -l "Skip Changelog"