-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a GitHub Actions workflow to automatically check for Changelog en…
…tries on pull requests (#66) * Add a GitHub Actions workflow to automatically check for Changelog entries on pull requests * Add changelog entry
- Loading branch information
Showing
2 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Changelog check | ||
on: | ||
pull_request: | ||
types: [assigned, opened, synchronize, reopened, labeled, unlabeled] | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
# Fetch all history | ||
fetch-depth: '0' | ||
|
||
- name: Install towncrier | ||
run: pip install towncrier | ||
|
||
- name: Check for presence of a Change Log fragment (only pull requests) | ||
run: | | ||
# Fetch the pull request' base branch so towncrier will be able to | ||
# compare the current branch with the base branch. | ||
# Source: https://github.com/actions/checkout/#fetch-all-branches. | ||
git fetch --no-tags origin ${BASE_BRANCH} | ||
towncrier check | ||
env: | ||
BASE_BRANCH: ${{ github.base_ref }} | ||
if: github.event_name == 'pull_request' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Add a GitHub Actions workflow to automatically check for Changelog entries on pull requests [@ericof] |