feat: add reusable github workflows (INT-1582)#1
Conversation
📝 WalkthroughWalkthroughThis PR adds five new reusable GitHub Actions workflows to the repository: linting (trunk checks and semantic PR titles), security auditing (Zizmor with pedantic settings), infrastructure testing (Terraform/Tofu matrix), release automation (release-please), and trunk upgrades. All workflows use ChangesGitHub Actions Reusable Workflows
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
.github/workflows/lint.yaml (1)
31-37: ⚡ Quick winGuard the semantic-title job to only run when PR context exists.
amannn/action-semantic-pull-requestexpects pull-request payload data; without a guard, this reusable workflow can fail when called from non-PR events.Suggested change
conventional-title: name: conventional title + if: ${{ github.event.pull_request != null }} runs-on: ubuntu-latest🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/lint.yaml around lines 31 - 37, The conventional-title job runs an action that requires PR context (amannn/action-semantic-pull-request) and should be guarded so it only executes for pull request events; update the job definition for conventional-title to include a conditional check (e.g. if: github.event_name == 'pull_request' or if: github.event.pull_request != null) so the job is skipped on non-PR events and the reusable action is never invoked without PR payload data.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/lint.yaml:
- Around line 5-7: Remove the explicit secrets: GITHUB_TOKEN requirement from
the workflow and update the two action usages that currently consume that secret
to use the built-in github.token context instead; specifically, delete the
secrets: GITHUB_TOKEN block and change the inputs for trunk-io/trunk-action and
amannn/action-semantic-pull-request so they no longer reference
secrets.GITHUB_TOKEN but use inputs: github.token (or directly ${ { github.token
} } in the action input) so the actions use the job-level github.token which
honors declared permissions.
In @.github/workflows/release-please.yaml:
- Around line 26-31: Replace the deprecated uses: tibdex/github-app-token step
in the workflow (step name "Create Token for MasterpointBot App", id
"generate-token") with the maintained GitHub action
actions/create-github-app-token, keeping the same input keys (app_id and
private_key) and any required permissions configuration; update the uses
reference to the current stable tag (e.g., actions/create-github-app-token@v3)
and ensure downstream steps that reference the generated token (via the
"generate-token" step id) continue to read the same output variable name.
In @.github/workflows/test.yaml:
- Around line 16-17: Remove the workflow input named GITHUB_TOKEN (do not accept
it as a caller-passed secret) and update any places that reference
secrets.GITHUB_TOKEN to use the workflow-scoped token ${ { github.token } }
instead; specifically replace usages of secrets.GITHUB_TOKEN with github.token
and keep the job-level permissions as-is so the scoped token enforces
least-privilege.
---
Nitpick comments:
In @.github/workflows/lint.yaml:
- Around line 31-37: The conventional-title job runs an action that requires PR
context (amannn/action-semantic-pull-request) and should be guarded so it only
executes for pull request events; update the job definition for
conventional-title to include a conditional check (e.g. if: github.event_name ==
'pull_request' or if: github.event.pull_request != null) so the job is skipped
on non-PR events and the reusable action is never invoked without PR payload
data.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: a2b707d2-f795-42fa-b42e-e90a91df7bff
📒 Files selected for processing (5)
.github/workflows/lint.yaml.github/workflows/release-please.yaml.github/workflows/test.yaml.github/workflows/trunk-upgrade.yaml.github/workflows/zizmor.yaml
|
I put this back into draft mode to look into the code rabbit suggestions. |
Gowiem
left a comment
There was a problem hiding this comment.
I didn't think we'd centralize all the things... but let's try it out.
what
tibdex/github-app-tokenis replaced withactions/create-github-app-tokensince the tibdex one was depracated on July 7, 2025. This is out of the original scope of migrating to reusable workflows, but it's a quick win to take care of this here.why
notes
masterpointio/actions/.github/workflows/workflow_name.yaml@sha123 #v0.1.0.references
Summary by CodeRabbit