Skip to content

ci: use pre-built 'get-pr' action#686

Merged
Aaron ("AJ") Steers (aaronsteers) merged 1 commit into
mainfrom
aj/ci/hotfix/use-explicit-sha-for-check-post
Jun 2, 2025
Merged

ci: use pre-built 'get-pr' action#686
Aaron ("AJ") Steers (aaronsteers) merged 1 commit into
mainfrom
aj/ci/hotfix/use-explicit-sha-for-check-post

Conversation

@aaronsteers

@aaronsteers Aaron ("AJ") Steers (aaronsteers) commented Jun 2, 2025

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Chores
    • Improved workflow reliability by ensuring the exact pull request commit is checked out and referenced during status checks.
    • Enhanced metadata handling for pull requests in automated test workflows.

@aaronsteers Aaron ("AJ") Steers (aaronsteers) changed the title ci: use pre-build 'get-pr' action ci: use pre-built 'get-pr' action Jun 2, 2025

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.0 to retrieve PR info.
  • Expose PR fields (repo, branch, SHA, number, title) as job outputs.
  • Use the commit-sha output for actions/checkout and 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 under jobs.<job_id> alongside runs-on and steps so that downstream jobs can correctly reference these outputs.
outputs:

@aaronsteers Aaron ("AJ") Steers (aaronsteers) merged commit f4ed27b into main Jun 2, 2025
19 of 20 checks passed
@aaronsteers Aaron ("AJ") Steers (aaronsteers) deleted the aj/ci/hotfix/use-explicit-sha-for-check-post branch June 2, 2025 20:10
@aaronsteers Aaron ("AJ") Steers (aaronsteers) restored the aj/ci/hotfix/use-explicit-sha-for-check-post branch June 2, 2025 20:11
@coderabbitai

coderabbitai Bot commented Jun 2, 2025

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

This change updates the GitHub Actions workflow to centralize pull request metadata retrieval in the start-workflow job using a dedicated action. Downstream jobs now use explicit outputs from this job—such as the commit SHA—for checking out code and posting status updates, removing the need for the previous PR checkout action.

Changes

File(s) Change Summary
.github/workflows/test-pr-command.yml Added step to fetch PR metadata; exposed new outputs (repo, branch, SHA, PR number, title); updated checkout and status steps to use explicit commit SHA; removed previous PR checkout action.

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
Loading

Possibly related PRs

  • airbytehq/PyAirbyte#683: Both PRs modify the .github/workflows/test-pr-command.yml workflow to improve how PR check statuses are handled, with the main PR focusing on fetching and using exact PR commit metadata for checkout and status updates, while the retrieved PR adds explicit "Pending" and "Completed" check status posts during the test job.

Would you like to consider aligning the status posting logic with that related PR for consistency, wdyt?


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b30ba20 and 84ef5c3.

📒 Files selected for processing (1)
  • .github/workflows/test-pr-command.yml (4 hunks)

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants