-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support to run check news from workflow
- Loading branch information
1 parent
87ffb04
commit d8b5e69
Showing
2 changed files
with
50 additions
and
33 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 |
---|---|---|
@@ -1,23 +1,28 @@ | ||
# Github Action Workflow enforcing our changelog style of enforcing PR number. | ||
# credit: https://github.com/psf/black/blob/main/.github/workflows/changelog.yml | ||
|
||
name: Changelog Entry Check | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize, labeled, unlabeled, reopened] | ||
|
||
jobs: | ||
build: | ||
name: Changelog Entry Check | ||
check-news: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- uses: actions/checkout@v2 | ||
- name: Grep Release Notes (docs-en) for PR number | ||
if: contains(github.event.pull_request.labels.*.name, 'skip changelog') != true | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.9' | ||
|
||
- name: Install dependencies using poetry | ||
if: steps.python_cache.outputs.cache-hit != 'true' | ||
run: | | ||
pip install tomli requests | ||
- name: Changelog Entry Check for the current PR | ||
run: | | ||
grep -Pz "\((\n\s*)?#${{ github.event.pull_request.number }}(\n\s*)?\)" docs/changelog.md || \ | ||
( | ||
echo "Please add '(#${{ github.event.pull_request.number }})' change line to docs/changelog.md" && exit 1 | ||
) | ||
python -m scripts.news.check_news_workflow ${{ github.event.pull_request.number }} |
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