Skip to content

Commit

Permalink
Fix CI once again
Browse files Browse the repository at this point in the history
  • Loading branch information
mikaelmello committed Apr 8, 2023
1 parent d8e68c9 commit fdcf97b
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions .github/workflows/changelog-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,17 @@ on:

jobs:
changelog-check:
if: github.event_name == 'pull_request' || github.event.issue.pull_request
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest

steps:
- name: PR number
id: pr-number
run: |
if [ "${{ github.event_name }}" = "issue_comment" ]; then
PR_NUMBER=${{ github.event.issue.number }}
else
PR_NUMBER=${{ github.event.pull_request.number }}
fi
echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_ENV
- name: Check if CHANGELOG is not required
id: command-check
run: |
PR_COMMENTS=$( \
curl -sSL -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/${{ github.repository }}/issues/${{ env.PR_NUMBER }}/comments \
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments \
)
readarray -t comments < <(jq -c '.[]' <<<"$PR_COMMENTS")
Expand Down Expand Up @@ -60,7 +49,7 @@ jobs:
if: steps.command-check.outputs.status != 'skip'
with:
fetch-depth: 0
ref: refs/pull/${{ env.PR_NUMBER }}/head
ref: refs/pull/${{ github.event.pull_request.number }}/head

# Example 1
- name: Get changed files
Expand Down

0 comments on commit fdcf97b

Please sign in to comment.