-
-
Notifications
You must be signed in to change notification settings - Fork 0
Mix things #81
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
Closed
Closed
Mix things #81
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
9dc31ed
feat: integrate CI/CD, config management, and Backstage UI from PR #77
rou-cru c295bb6
feat: improve Taskfile UX with internal flags (from PR #77)
rou-cru 337652c
Update .github/labeler.yml
rou-cru 23a7412
Update .github/workflows/auto-merge.yaml
rou-cru 1d11e8c
Merge branch 'main' into mix-things
rou-cru 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 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
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
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
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
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
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,13 @@ | ||
| ## Summary | ||
| - What does this change do? | ||
| - Any user-facing or breaking changes? | ||
|
|
||
| ## Testing | ||
| - [ ] Not run (explain why) | ||
| - [ ] Added/updated automated tests | ||
| - [ ] Manually tested (`<commands>`) | ||
|
|
||
| ## Checklist | ||
| - [ ] Docs updated if needed | ||
| - [ ] Conventional commit in title | ||
| - [ ] Linked issue (if relevant) |
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,83 @@ | ||
| name: Auto Merge with CodeRabbit | ||
|
|
||
| on: | ||
| pull_request_target: | ||
| types: [opened, reopened, synchronize, ready_for_review, review_requested] | ||
| workflow_run: | ||
| workflows: ["CI Pipeline", "Documentation"] | ||
| types: [completed] | ||
|
|
||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
| checks: read | ||
| statuses: read | ||
|
|
||
| jobs: | ||
| auto-merge: | ||
| runs-on: ubuntu-latest | ||
| if: github.event.pull_request.head.repo.full_name == github.repository || github.event.workflow_run.event == 'pull_request' | ||
| steps: | ||
| - name: Get PR context | ||
| id: ctx | ||
| uses: actions/github-script@v8 | ||
| with: | ||
| script: | | ||
| const pr = context.payload.pull_request | ||
| ? context.payload.pull_request | ||
| : await (async () => { | ||
| // workflow_run path | ||
| const run = context.payload.workflow_run | ||
| const prData = run.pull_requests && run.pull_requests[0] | ||
| if (!prData) return null | ||
| const { data } = await github.rest.pulls.get({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| pull_number: prData.number, | ||
| }) | ||
| return data | ||
| })() | ||
|
|
||
| if (!pr) { | ||
| core.setFailed('No pull_request context available') | ||
| return | ||
| } | ||
|
|
||
| // basic guards | ||
| if (pr.draft) { | ||
| core.setOutput('status', 'skip-draft') | ||
| return | ||
| } | ||
| if (pr.state !== 'open') { | ||
| core.setOutput('status', 'skip-closed') | ||
| return | ||
| } | ||
| if (pr.mergeable_state === 'behind') { | ||
| core.setOutput('status', 'skip-behind') | ||
| return | ||
| } | ||
| if (!pr.mergeable_state || pr.mergeable_state === 'unknown') { | ||
| core.setOutput('status', 'skip-unknown') | ||
| core.info('Mergeable state is unknown, waiting for GitHub to compute it') | ||
| return | ||
| } | ||
| const acceptableStates = ['clean', 'unstable', 'has_hooks'] | ||
| if (!acceptableStates.includes(pr.mergeable_state)) { | ||
| core.setOutput('status', `skip-${pr.mergeable_state}`) | ||
| core.info(`Mergeable state '${pr.mergeable_state}' not acceptable for auto-merge`) | ||
| return | ||
| } | ||
|
|
||
| core.setOutput('pr-number', pr.number.toString()) | ||
| core.setOutput('mergeable_state', pr.mergeable_state || 'unknown') | ||
| core.setOutput('status', 'ready') | ||
|
|
||
| - name: Enable auto-merge | ||
| if: steps.ctx.outputs.status == 'ready' && | ||
| steps.ctx.outputs.mergeable_state != 'behind' && | ||
| steps.ctx.outputs.mergeable_state != 'unknown' | ||
| uses: peter-evans/enable-pull-request-automerge@v3 | ||
| with: | ||
| token: ${{ secrets.GITHUB_TOKEN }} | ||
| pull-request-number: ${{ steps.ctx.outputs.pr-number }} | ||
| merge-method: squash |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.