Releases: suzuki-shunsuke/pinact
v3.3.0
Pull Requests | Issues | v3.2.0...v3.3.0
Features
#1007 Support creating pull request reviews
#1007 Support outputting diff
#1007 Support fixing code while using -check option
Support creating pull request reviews
This pull request enables pinact to create reviews by GitHub API.
A GitHub access token with pull_requests:write permission is required.
pinact run \
-review \
-repo-owner <repository owner> \
-repo-name <repository name> \
-pr <pull request number> \
-sha <commit SHA to be reviewed>If pinact is run via GitHub Actions pull_request event, options (-repo-owner, -repo-name, -pr, -sha) are auto-completed.
Warning
GitHub can't create pull request reviews on files not changed by the pull request.
When pinact fails to create reviews, pinact outputs warning and creates GitHub Actions error messages to log instead.
You can ignore the warning like this:
WARN[0004] create a review comment error="create a review comment: POST https://api.github.com/repos/szksh-lab-2/test-github-action/pulls/317/comments: 422 Validation Failed [{Resource:PullRequestReviewComment Field:pull_request_review_thread.path Code:invalid Message:} {Resource:PullRequestReviewComment Field:pull_request_review_thread.diff_hunk Code:missing_field Message:}]" line=" - uses: suzuki-shunsuke/watch-star-action@feat/first-pr" line_number=14 pinact_version=3.3.0-5 program=pinact review_pr_number=317 review_repo_name=test-github-action review_repo_owner=szksh-lab-2 review_sha=92f0b04efdc10acb793e78bdd1f70958dd3fd9a3 workflow_file=.github/workflows/watch.yaml
Support outputting diff
Using -diff option, pinact can output diff.
pinact run -diffERROR action isn't pinned
.github/workflows/test.yaml:14
- - uses: aquaproj/aqua-installer@v4.0.0
+ - uses: aquaproj/aqua-installer@9ebf656952a20c45a5d66606f083ff34f58b8ce0 # v4.0.0
Fix code by -fix option
If -check or -diff option is set, pinact doesn't fix code by default.
By setting -fix option, you can fix code.
pinact run -check -fixpinact run -diff -fix📝 -diff, -check, -fix options
The behaviour of pinact run command is changed by command line options -diff, -check, and -fix.
This is a table how the behaviour is changed by these options.
| options | Fix files | Exit with code 1 if actions aren't pinned | Output changes |
|---|---|---|---|
| No option | o | ||
| -check | o | ||
| -diff | o | ||
| -check -diff | o | o | |
| -check -fix | o | o | o |
| -fix -diff | o | o |
v3.3.0-5
v3.3.0-4
v3.3.0-3
v3.3.0-2
v3.3.0-1
v3.3.0-0
v3.2.0
v3.2.0-0
v3.1.2
Pull Requests | Issues | v3.1.1...v3.1.2
Fixes
#980 Change the log level to debug to suppress warning


