-
Notifications
You must be signed in to change notification settings - Fork 2
docs: review on every push, now that a push costs a delta #87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,7 +18,7 @@ name: CodeBoarding review | |
|
|
||
| on: | ||
| pull_request: | ||
| types: [opened, reopened, ready_for_review] | ||
| types: [opened, reopened, ready_for_review, synchronize] | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
For repositories following the protected-branch setup at Useful? React with 👍 / 👎. |
||
| issue_comment: | ||
| types: [created] | ||
|
|
||
|
|
@@ -28,6 +28,16 @@ permissions: | |
| issues: write | ||
| id-token: write | ||
|
|
||
| # One review at a time per pull request. Two pushes in quick succession would | ||
| # otherwise analyze concurrently, and both would start from the same older | ||
| # analysis instead of the newer one continuing from its predecessor. They also | ||
| # share one sticky comment, so whichever finishes last wins — which can be the | ||
| # run for the older commit. Queue rather than cancel, so a /codeboarding command | ||
| # waits for a running review instead of killing it. | ||
| concurrency: | ||
| group: codeboarding-${{ github.event.pull_request.number || github.event.issue.number }} | ||
| cancel-in-progress: false | ||
|
Comment on lines
+37
to
+39
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When one review is running and a Useful? React with 👍 / 👎. |
||
|
|
||
| jobs: | ||
| review: | ||
| if: > | ||
|
|
@@ -44,6 +54,10 @@ jobs: | |
|
|
||
| Automatic runs update one sticky **CodeBoarding review** comment. A trusted repository owner, member, or collaborator can comment `/codeboarding` to analyze the current PR head again, including on fork PRs; every command creates a new result comment. | ||
|
|
||
| `synchronize` re-runs the review on every push to the branch. Each of those runs covers only the commits pushed since the previous one, so a push costs a fraction of a first analysis — and a pushed commit is the only thing that builds the reusable analysis, since GitHub gives comment-triggered runs a read-only cache. Drop `synchronize` from the list if you would rather spend one analysis per pull request than one per push. | ||
|
|
||
| Keep the `concurrency` block if you keep `synchronize`: it is what makes a push continue from the push before it, and what stops a slower run for an older commit from overwriting the review comment for a newer one. Set `cancel-in-progress: true` instead to abandon a superseded run rather than queue it, which costs less when branches are pushed to rapidly, at the price of no analysis for the commits in between. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Even when every queued event is a valid Useful? React with 👍 / 👎. |
||
|
|
||
| | Command | What it does | | ||
| |---|---| | ||
| | `/codeboarding` | Analyzes the current head, reusing this PR's previous analysis when one is available. | | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.