-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a workflow looking for changelog fragments
Limitations: - The comment asking for the fragment will be posted at each push on the PR until the fragment is present. Closes:: #186
- Loading branch information
Showing
11 changed files
with
57 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,18 @@ | ||
--- | ||
on: | ||
pull_request: | ||
|
||
name: Check changelog fragment | ||
jobs: | ||
check_fragment: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Automatic Rebase | ||
run: ./hacking/check_fragment.sh | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
PR_NUMBER: ${{ github.event.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
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,2 @@ | ||
trivial: | ||
- GH Actions now checks that all PR contains a changelog fragment. |
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,7 @@ | ||
Dear contributor, | ||
|
||
Thank you for you Pull Request ! | ||
To ease the work of maintainers you need to add a [changelog fragment](https://docs.ansible.com/ansible/latest/community/development_process.html#creating-a-changelog-fragment) in you PR. | ||
|
||
It will help your change be released faster ! | ||
Thank you ! |
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,23 @@ | ||
#!/bin/bash | ||
|
||
function comment() { | ||
echo "No fragment detected" | ||
if [ -n "$PR_NUMBER" ]; then | ||
gh pr review "$PR_NUMBER" -r -F "$(git rev-parse --show-toplevel)/hacking/NEED_FRAGMENT" | ||
fi | ||
exit 1 | ||
} | ||
|
||
function approve() { | ||
if [ -n "$PR_NUMBER" ]; then | ||
gh pr review "$PR_NUMBER" -a | ||
fi | ||
} | ||
|
||
FRAGMENTS=$(git fetch && git diff --name-only --diff-filter=ACMRT origin/main..HEAD | grep "changelogs/fragments") | ||
|
||
if [ -z "$FRAGMENTS" ]; then | ||
comment | ||
else | ||
approve | ||
fi |
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,2 +1,3 @@ | ||
plugins/modules/grafana_dashboard.py validate-modules:invalid-argument-name | ||
tests/unit/modules/grafana/grafana_plugin/test_grafana_plugin.py pep8:W291 | ||
hacking/check_fragment.sh shebang |
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,2 +1,3 @@ | ||
plugins/modules/grafana_dashboard.py validate-modules:invalid-argument-name | ||
tests/unit/modules/grafana/grafana_plugin/test_grafana_plugin.py pep8:W291 | ||
hacking/check_fragment.sh shebang |
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,2 +1,3 @@ | ||
plugins/modules/grafana_dashboard.py validate-modules:invalid-argument-name | ||
tests/unit/modules/grafana/grafana_plugin/test_grafana_plugin.py pep8:W291 | ||
hacking/check_fragment.sh shebang |
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,2 +1,3 @@ | ||
plugins/modules/grafana_dashboard.py validate-modules:invalid-argument-name | ||
tests/unit/modules/grafana/grafana_plugin/test_grafana_plugin.py pep8:W291 | ||
hacking/check_fragment.sh shebang |
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,2 +1,3 @@ | ||
plugins/modules/grafana_dashboard.py validate-modules:invalid-argument-name | ||
tests/unit/modules/grafana/grafana_plugin/test_grafana_plugin.py pep8:W291 | ||
hacking/check_fragment.sh shebang |
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 +1,2 @@ | ||
tests/unit/modules/grafana/grafana_plugin/test_grafana_plugin.py pep8:W291 | ||
hacking/check_fragment.sh shebang |