Skip to content

Commit

Permalink
[ci] merge two comments into one
Browse files Browse the repository at this point in the history
  • Loading branch information
Accelerator1996 committed Nov 28, 2024
1 parent 906052b commit 215cef8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
11 changes: 0 additions & 11 deletions .github/actions/coverage/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,17 +106,6 @@ runs:
name: ${{ steps.get-cov-report.outputs.report }}
path: ${{ steps.get-cov-report.outputs.path }}

- name: 'Create code coverage report and comment'
run: |
if [ -n "${{ inputs.reset-commit-id }}" ];then
title="Base Code Coverage Report"
else
title="Current PR Code Coverage Report"
fi
content=$(echo "for detail, [goto summary](https://github.com/${{ github.repository_owner }}/${{ github.event.repository.name }}/actions/runs/${{github.run_id}}) download Artifacts \`${{ steps.get-cov-report.outputs.report }}\`")
curl -L -X POST "https://api.github.com/repos/${{github.repository}}/issues/${{github.event.pull_request.number}}/comments" -H "Authorization: Bearer ${{github.token}}" -H 'Content-Type: application/json' -d "{\"body\": \"${title}\\n$content}\""
shell: bash

- name: 'Checkout source code'
uses: actions/checkout@v4
if: ${{ inputs.reset-commit-id }} != ""
5 changes: 5 additions & 0 deletions .github/workflows/linux_llvm_cov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ jobs:
- cov-test
runs-on: ubuntu-22.04
steps:
- name: 'Create comment'
run: |
content=$(echo "for detail, [goto summary](https://github.com/${{ github.repository_owner }}/${{ github.event.repository.name }}/actions/runs/${{github.run_id}}) download Artifacts \`base-ylt-cov-report\`(base commit coverage report) and `ylt-cov-report`(current pull request coverage report)")
curl -L -X POST "https://api.github.com/repos/${{github.repository}}/issues/${{github.event.pull_request.number}}/comments" -H "Authorization: Bearer ${{github.token}}" -H 'Content-Type: application/json' -d "{\"body\": \"$content}\""
shell: bash
- name: 'Compare data'
run: |
sudo apt install -y bc
Expand Down

0 comments on commit 215cef8

Please sign in to comment.