Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 09fb7d9

Browse filesBrowse files
committed
Check changelog only if tests have been modified. Remove grep command.
1 parent 90321f4 commit 09fb7d9
Copy full SHA for 09fb7d9

File tree

Expand file treeCollapse file tree

1 file changed

+12
-10
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+12
-10
lines changed

‎.github/workflows/check_changelog.yml

Copy file name to clipboardExpand all lines: .github/workflows/check_changelog.yml
+12-10Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,24 @@ jobs:
88
runs-on: ubuntu-latest
99
if: ${{ contains(github.event.pull_request.labels.*.name, 'no-changelog') == 0 }}
1010
steps:
11-
- name: Get PR number and author
11+
- name: Get PR number
1212
run: |
1313
echo "PR_NUMBER=${{ github.event.pull_request.number }}" >> $GITHUB_ENV
14-
echo "PR_AUTHOR=${{ github.event.pull_request.user.login }}" >> $GITHUB_ENV
1514
- uses: actions/checkout@v2
1615
with:
1716
fetch-depth: '0'
18-
- name: Check the changelog
17+
- name: Check the changelog only if tests have been modified
1918
run: |
2019
set -xe
21-
result=`grep "$PR_NUMBER" ./doc/whats_new/v*.rst | grep "$PR_AUTHOR"`
22-
if [ "$result" != "" ]
20+
tests=$(git diff --name-only origin/master)
21+
if [[ "$tests" =~ tests ]]
2322
then
24-
echo $result
25-
else
26-
then
27-
echo "Changelog entry is missing."
28-
exit 1
23+
result=$(cat ./doc/whats_new/v*.rst)
24+
if [[ "$result" =~ :pr:\`$PR_NUMBER\` ]]
25+
then
26+
echo "Changelog has been updated."
27+
else
28+
echo "Changelog entry is missing."
29+
exit 1
30+
fi
2931
fi

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.