Skip to content

Commit

Permalink
Merge pull request #121 from Wuyunfan-BUPT/ci_write_comment_permissio…
Browse files Browse the repository at this point in the history
…n_separation

feat: run id回写评论区&权限分离
  • Loading branch information
Wuyunfan-BUPT authored Aug 6, 2024
2 parents 3266a78 + 33decea commit 77e480b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/pr-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ env:
TEST_REPO_NAME: nacos-group/nacos-e2e
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
HEADER_PARAMS: "-H \"Accept: application/vnd.github+json\" -H \"Authorization: Bearer ${{ secrets.ACTION_TOKEN }}\" -H \"X-GitHub-Api-Version: 2022-11-28\""
HEADER_PARAMS_WRITE_COMMENT: "-H \"Accept: application/vnd.github+json\" -H \"Authorization: Bearer ${{ secrets.ACTION_TOKEN_OTHER }}\" -H \"X-GitHub-Api-Version: 2022-11-28\""
BASE_URL: https://api.github.com/repos/${GITHUB_REPOSITORY}

jobs:
Expand All @@ -32,7 +33,7 @@ jobs:
number=`curl -L ${{ env.HEADER_PARAMS }} ${{ env.BASE_URL }}/actions/variables | jq -r '.variables[]? | select(.name == "VAR_${{ github.event.workflow_run.id }}") | .value'`
echo "number=${number}"
done
curl -L -X POST ${{ env.HEADER_PARAMS }} ${{ env.BASE_URL }}/issues/${number}/comments -d "{\"body\":\"The URL of CI ( pr-e2e-test ) is : https://github.com/${GITHUB_REPOSITORY}/actions/runs/${{ github.run_id }}\"}"
curl -L -X POST ${{ env.HEADER_PARAMS_WRITE_COMMENT }} ${{ env.BASE_URL }}/issues/${number}/comments -d "{\"body\":\"The URL of CI ( pr-e2e-test ) is : https://github.com/${GITHUB_REPOSITORY}/actions/runs/${{ github.run_id }}\"}"
curl -L -X DELETE ${{ env.HEADER_PARAMS }} ${{ env.BASE_URL }}/actions/variables/VAR_${{ github.event.workflow_run.id }}
docker:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 77e480b

Please sign in to comment.