Skip to content

Commit

Permalink
improve json & pr comment do not run when cancelled
Browse files Browse the repository at this point in the history
  • Loading branch information
eruizalo committed Oct 13, 2022
1 parent 3c9a23f commit 0cce01d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,14 @@ jobs:
run: |
echo "{
\"pr_number\": ${{ github.event.number }},
\"before\": \"${{ github.event.before }}\",
\"after\": \"${{ github.event.after }}\",
\"sha\": \"${{ GITHUB_SHA }}\",
\"ref\": \"${{ GITHUB_REF }}\",
\"from_branch\": \"${{ github.head_ref }}\",
\"to_branch\": \"${{ github.base_ref }}\",
\"head\": {
\"branch\": \"${{ github.head_ref }}\",
\"sha\": \"${{ github.event.after }}\"
},
\"remote\": {
\"branch\": \"${{ github.base_ref }}\",
\"sha\": \"${{ github.event.before }}\"
},
\"html\": \"${{ github.event.pull_request._links.html.href }}\",
\"additions\": ${{ github.event.pull_request.additions }},
\"deletions\": ${{ github.event.pull_request.deletions }},
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/pr_comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:

jobs:
create_test_summary_report:
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event.workflow_run.conclusion == 'failure'}}
# if: github.repository == 'hablapps/doric'
runs-on: ubuntu-latest
name: Create testing summary comment
Expand All @@ -34,7 +35,7 @@ jobs:
id: output_pr_context
shell: bash
run: |
content="$(cat pr_context.json/pr_context.json)"
content="$(cat pr_context.json)"
echo "${content}"
# the following lines are only required for multi line json
content="${content//'%'/'%25'}"
Expand Down

0 comments on commit 0cce01d

Please sign in to comment.