ci: use pre-built 'get-pr' action#686
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR replaces a custom PR checkout step with a pre-built get-pr action to fetch PR metadata and uses the extracted commit SHA for subsequent checkout and status updates.
- Introduce
cloudposse-github-actions/get-pr@v2.0.0to retrieve PR info. - Expose PR fields (repo, branch, SHA, number, title) as job outputs.
- Use the
commit-shaoutput foractions/checkoutand status-posting steps.
Comments suppressed due to low confidence (1)
.github/workflows/test-pr-command.yml:44
- The
outputs:block is indented under the PR info step instead of at the job level. It should be moved up underjobs.<job_id>alongsideruns-onandstepsso that downstream jobs can correctly reference these outputs.
outputs:
f4ed27b
into
main
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughThis change updates the GitHub Actions workflow to centralize pull request metadata retrieval in the Changes
Sequence Diagram(s)sequenceDiagram
participant Workflow
participant StartWorkflow
participant GetPRInfo
participant PytestOnDemand
Workflow->>StartWorkflow: Trigger workflow with PR number
StartWorkflow->>GetPRInfo: Fetch PR metadata (repo, branch, SHA, etc.)
GetPRInfo-->>StartWorkflow: Return PR metadata
StartWorkflow-->>PytestOnDemand: Pass outputs (commit SHA, branch, etc.)
PytestOnDemand->>actions/checkout@v4: Checkout code at commit SHA
PytestOnDemand->>CreateStatusCheck: Post status using commit SHA
Possibly related PRs
Would you like to consider aligning the status posting logic with that related PR for consistency, wdyt? 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Summary by CodeRabbit