-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: stop treating same head and review SHA as force (#300)
After some testing, I noticed that when the base branch is merged/PR is rebased **cleanly**, Github API changes the associated SHA of PR review to the latest commit. However, if merge/rebase is **not clean**, and there are some changes, the associated SHA stays the same. That means that GitHub is completely responsible for correctly identifying whether there were some changes since the last review, and this action can't distinguish between a clean merge/force push and a re-run of the action. So to prevent unexpected review removals when the base branch is merged/PR is rebased **cleanly**, this PR removes "PR review dismiss" for `reviewAssociatedCommit === headCommit` condition. </br> BREAKING CHANGE: When `head` SHA and SHA associated with the review are the same, it is no longer interpreted as force push, and the review is **not** dismissed. If the `head` and review SHAs are the same, it's either because there were no new commits, or because the base branch was merged/PR was rebased **cleanly**. Fixes #253
- Loading branch information
Showing
5 changed files
with
6 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
export default { | ||
'*.{js,ts,json,yml,md,mdx}': filenames => | ||
`prettier --write ${filenames.join(' ')}`, | ||
'*.{js,ts,json}': () => 'pnpm run package', | ||
'*.{js,ts,json}': () => ['pnpm run package', 'git add dist'], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters