Closed greenhandatsjtu closed 2 years ago
@smrpn @hackerchai @PsiACE @GopherJ please review
Merging #298 (1ccd8bd) into master (663e764) will not change coverage. The diff coverage is
n/a
.
@@ Coverage Diff @@
## master #298 +/- ##
=======================================
Coverage 81.46% 81.46%
=======================================
Files 23 23
Lines 3463 3463
=======================================
Hits 2821 2821
Misses 642 642
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 663e764...1ccd8bd. Read the comment docs.
Fix: https://github.com/casbin/casbin-rs/issues/294 I found benchmark workflow doesn’t work well that it fails to post comment to PR. The reason is
GITHUB_TOKEN
only has read permission to pull requests when access by forked repos, so when a new PR is coming, running workflows only has read-only permission (of course not allowed to post comment). ref: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_tokenLuckily, GitHub has introduced a new event type:
pull_request_target
, which allows to run workflows from base branch and pass a token with write permission, so we can use it to post benchmark results to PR (ref: https://github.community/t/github-actions-are-severely-limited-on-prs/18179/17).I modify pull_request.yml to use
pull_request_target
, now it works well: