Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
check change log in CI
Browse files Browse the repository at this point in the history
StFroese committed Dec 1, 2022
1 parent fe9162f commit 94ba4e1
Showing 2 changed files with 33 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/check_changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Check PR change log

on:
# So it cannot be skipped.
pull_request_target:
types: [opened, synchronize, labeled, unlabeled]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
changelog_checker:
name: Check if towncrier change log entry is correct
runs-on: ubuntu-latest
steps:
- uses: pllim/actions-towncrier-changelog@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BOT_USERNAME: gilesbot
13 changes: 13 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -56,3 +56,16 @@ exclude = '''
[[tool.towncrier.section]]
name = ""
path = ""

[tool.gilesbot]
[tool.gilesbot.pull_requests]
enabled = true

[tool.gilesbot.towncrier_changelog]
enabled = true
verify_pr_number = true
changelog_skip_label = "no-changelog-needed"
changelog_missing_long = "There isn't a changelog file in this pull request. Please add a changelog file to the `changes/` directory following the instructions in the changelog [README](https://github.com/cta-observatory/ctapipe/blob/main/docs/changes/README.rst)."
type_incorrect_long = "The changelog file you added is not one of the allowed types. Please use one of the types described in the changelog [README](https://github.com/cta-observatory/ctapipe/blob/main/docs/changes/README.rst)"
number_incorrect_long = "The number in the changelog file you added does not match the number of this pull request. Please rename the file."

0 comments on commit 94ba4e1

Please sign in to comment.