Skip to content

Commit

Permalink
skip changelog for [chore] prs (#5676)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
Alex Boten and TylerHelmuth committed Jul 15, 2022
1 parent 7c125fb commit 0509360
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
2 changes: 1 addition & 1 deletion .github/workflows/scripts/dependabot-pr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit 0509360

Please sign in to comment.