Repository navigation
Update CodeBoarding workflow configuration #5
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| name: CodeBoarding | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [opened, reopened, closed, synchronize] | ||
| issue_comment: | ||
| types: [created] | ||
| push: | ||
| branches: ['main'] | ||
| workflow_dispatch: | ||
| inputs: | ||
| force_full: | ||
| description: 'Ignore the saved analysis and rebuild it from scratch (full analysis).' | ||
| type: boolean | ||
| required: false | ||
| default: false | ||
|
|
||
| # No workflow-level permissions: each job requests only what it needs (least | ||
| # privilege), so the default token starts with none. | ||
| permissions: {} | ||
|
|
||
| # Reviews queue per pull request, syncs per branch. Closing a pull request cancels its review. | ||
| concurrency: | ||
| group: codeboarding-${{ github.event.pull_request.number || github.event.issue.number || github.ref_name }} | ||
| cancel-in-progress: ${{ github.event_name == 'pull_request' && github.event.action == 'closed' }} | ||
|
|
||
| jobs: | ||
| review: | ||
| if: > | ||
| (github.event_name == 'pull_request' && github.event.action != 'closed' && | ||
| github.event.pull_request.head.repo.full_name == github.repository) || | ||
| (github.event_name == 'issue_comment' && github.event.issue.pull_request != null && | ||
| startsWith(github.event.comment.body, '/codeboarding') && | ||
| contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'), github.event.comment.author_association)) | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 60 | ||
| permissions: | ||
| contents: read # check out the repo + read the saved analysis (no writes in review mode) | ||
| pull-requests: write # post the architecture-diff PR comment | ||
| issues: write # the /codeboarding issue_comment trigger + comment API | ||
| id-token: write # mint a GitHub OIDC token for the free hosted tier (write is the only level for id-token) | ||
| actions: read # let a repeat review download the analysis an earlier run published, instead of re-deriving the whole PR | ||
| steps: | ||
| - uses: CodeBoarding/CodeBoarding-action@refactor/review-baseline-pipeline | ||
| with: | ||
| # CodeBoarding's free hosted tier. No secret to add: the run authenticates | ||
| # with the GitHub OIDC token that `id-token: write` above grants. | ||
| llm: hosted | ||
|
|
||
| sync: | ||
| if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 60 | ||
| permissions: | ||
| contents: write # push the generated analysis to codeboarding/baseline | ||
| actions: read # continue from an analysis an earlier run published | ||
| id-token: write # identifies this repo to CodeBoarding's hosted tier | ||
| steps: | ||
| - uses: CodeBoarding/CodeBoarding-action@refactor/review-baseline-pipeline | ||
| with: | ||
| mode: sync | ||
| force_full: ${{ inputs.force_full || false }} | ||
| # CodeBoarding's free hosted tier. No secret to add: the run authenticates | ||
| # with the GitHub OIDC token that `id-token: write` above grants. | ||
| llm: hosted | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When
workflow_dispatchis launched with any branch other thanmainselected, omittingtarget_branchmakes CodeBoarding use the event branch by default, whereas the deleted sync workflow explicitly passedtarget_branch: main. Consequently, a force-full or recovery run can analyze/sync the selected feature branch instead of refreshing the intended main baseline. The CodeBoarding input documentation confirms thattarget_branchdefaults to the event branch; passtarget_branch: mainhere or otherwise restrict dispatches tomain.Useful? React with 👍 / 👎.