Skip to content

Conversation

@reddevilmidzy
Copy link
Owner

@reddevilmidzy reddevilmidzy commented Nov 12, 2025

♟️ What’s this PR about?

Introduce a new GitHub Action named "queensac" that checks repository links and optionally opens pull requests to fix them. The action includes configurable inputs for repository URL, target branch, dry-run mode, and GitHub App credentials. Additionally, update environment variable references in the code to align with the new action's naming conventions.

🔗 Related Issues / PRs

resolve: #295

Summary by CodeRabbit

  • New Features

    • New GitHub Action "queensac" to validate (and optionally fix) repository links from workflows, with inputs for repository, branch, and dry-run mode and support for supplying GitHub App credentials.
  • Chores

    • Updated authentication to use GitHub App credentials (App ID and private key); README workflows updated to reflect the new inputs.

Copilot AI review requested due to automatic review settings November 12, 2025 08:51
@github-actions github-actions bot added this to the 8차 MVP 구현 milestone Nov 12, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 12, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Adds a new composite GitHub Action queensac (action.yml) and renames GitHub App environment variables from GITHUB_APP_ID / GITHUB_APP_PRIVATE_KEY to QUEENSAC_APP_ID / QUEENSAC_APP_PRIVATE_KEY in the codebase.

Changes

Cohort / File(s) Summary
GitHub Actions Composite Action
action.yml
New composite action queensac with inputs repo, branch, dry-run, github_app_id, github_app_private_key; step 1 installs the Queensac Rust binary via cargo and updates PATH; step 2 runs queensac with --repo, optional --branch, optional --dry-run; forwards QUEENSAC_APP_ID and QUEENSAC_APP_PRIVATE_KEY; both steps use set -eo pipefail.
Env var rename in Rust code
src/git/pr_generator.rs, src/main.rs
Replaced usage and error messages referencing GITHUB_APP_ID / GITHUB_APP_PRIVATE_KEY with QUEENSAC_APP_ID / QUEENSAC_APP_PRIVATE_KEY; reading from env and control flow unchanged.
Docs/workflow examples
README.md, README.ko.md
Updated workflow examples to supply github_app_id, github_app_private_key, and repo (removed github_token).

Sequence Diagram(s)

sequenceDiagram
  participant Runner as GitHub Actions runner
  participant Action as composite action (action.yml)
  participant Shell as shell steps
  participant Queensac as queensac binary

  Runner->>Action: uses reddevilmidzy/queensac
  Action->>Shell: Step 1: install queensac (cargo install)
  Shell->>Shell: set -eo pipefail\ncargo install --locked --git ... queensac\nexport PATH
  Action->>Shell: Step 2: run queensac
  note right of Shell `#E8F6EF`: Env forwarded:\nQUEENSAC_APP_ID\nQUEENSAC_APP_PRIVATE_KEY
  Shell->>Queensac: queensac --repo <repo> [--branch <branch>] [--dry-run]
  Queensac-->>Shell: exit code / output
  Shell-->>Runner: step status
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Check all env var references across repo to ensure consistent rename.
  • Verify action.yml inputs map correctly to the queensac CLI flags and that secrets are passed securely.
  • Confirm README examples match the composite action input names and expected values.

Possibly related PRs

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding a new GitHub Action named 'queensac' for repository link checks, which matches the PR's core objective.
Description check ✅ Passed The description follows the template structure with clear sections explaining what the PR does and linking to issue #295, meeting the repository's requirements.
Linked Issues check ✅ Passed The PR implements GitHub Action setup for queensac with configurable inputs (repo, branch, dry-run, github_app_id, github_app_private_key), enabling workflow execution of repository link checks as requested in #295.
Out of Scope Changes check ✅ Passed All changes focus on creating the GitHub Action and updating environment variable references to QUEENSAC_APP_ID/QUEENSAC_APP_PRIVATE_KEY for consistency; no unrelated modifications detected.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch action

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

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

Copilot AI left a comment

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 introduces a new GitHub Action for the queensac tool that checks repository links and optionally creates pull requests to fix broken links. The main changes involve renaming environment variables from GITHUB_APP_* to QUEENSAC_APP_* to better align with the action's branding and avoid naming conflicts.

  • Added a new action.yml file that defines the queensac GitHub Action with configurable inputs
  • Updated environment variable references from GITHUB_APP_ID/GITHUB_APP_PRIVATE_KEY to QUEENSAC_APP_ID/QUEENSAC_APP_PRIVATE_KEY across the codebase
  • Updated error messages and documentation to reflect the new environment variable names

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
action.yml Newly added GitHub Action definition with inputs for repo URL, branch, dry-run mode, and GitHub App credentials
src/main.rs Updated error message to reference the new QUEENSAC_APP_ID and QUEENSAC_APP_PRIVATE_KEY environment variables
src/git/pr_generator.rs Updated GitHubAppConfig::from_env() to read from QUEENSAC_APP_* environment variables and updated corresponding documentation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@coveralls-official
Copy link

coveralls-official bot commented Nov 12, 2025

Pull Request Test Coverage Report for Build 19291944401

Details

  • 0 of 4 (0.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 81.215%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/main.rs 0 1 0.0%
src/git/pr_generator.rs 0 3 0.0%
Totals Coverage Status
Change from base Build 19273392933: 0.0%
Covered Lines: 1323
Relevant Lines: 1629

💛 - Coveralls

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
action.yml (1)

27-33: Consider optimizing installation performance.

The action installs queensac from source using cargo install --path on every run, which requires compiling the entire Rust project. This can significantly slow down workflow execution times.

Consider:

  1. Using actions/cache to cache cargo build artifacts
  2. Pre-building and distributing binaries for common platforms
  3. Documenting the expected installation time in the action description

Example caching setup:

- name: Cache cargo build
  uses: actions/cache@v4
  with:
    path: |
      ~/.cargo/bin/
      ~/.cargo/registry/index/
      ~/.cargo/registry/cache/
      ~/.cargo/git/db/
      target/
    key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 31b9cc9 and df00508.

📒 Files selected for processing (3)
  • action.yml (1 hunks)
  • src/git/pr_generator.rs (1 hunks)
  • src/main.rs (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: reddevilmidzy
Repo: reddevilmidzy/queensac PR: 226
File: src/main.rs:21-32
Timestamp: 2025-09-22T15:50:19.531Z
Learning: User reddevilmidzy prefers to communicate in Korean and likes to keep PR scope focused and well-defined.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: test
  • GitHub Check: Agent
  • GitHub Check: Analyze (rust)
🔇 Additional comments (3)
src/main.rs (1)

72-72: LGTM! Error message updated correctly.

The error message now references the renamed environment variables QUEENSAC_APP_ID and QUEENSAC_APP_PRIVATE_KEY, which is consistent with the changes in src/git/pr_generator.rs.

src/git/pr_generator.rs (1)

50-57: LGTM! Environment variable renaming is consistent.

The documentation comments and environment variable names have been properly updated from GITHUB_APP_* to QUEENSAC_APP_*. The error messages correctly reference the new variable names.

action.yml (1)

34-56: Run step implementation looks good.

The command construction logic correctly handles optional inputs and sets the renamed environment variables QUEENSAC_APP_ID and QUEENSAC_APP_PRIVATE_KEY that align with the code changes in src/git/pr_generator.rs and src/main.rs.

Note: Runtime validation for required GitHub App credentials is handled by the Rust code (lines 71-74 in src/main.rs), which will exit with an error if the credentials are missing when needed.

Introduce a new GitHub Action named "queensac" that checks repository links and optionally opens pull requests to fix them. The action includes configurable inputs for repository URL, target branch, dry-run mode, and GitHub App credentials. Additionally, update environment variable references in the code to align with the new action's naming conventions.
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
action.yml (1)

18-23: Clarify conditional input requirements in descriptions.

The github_app_id and github_app_private_key inputs are marked as optional but are actually required when dry-run is false (to create pull requests). Consider updating the input descriptions to clarify this dependency:

  github_app_id:
-   description: "GitHub App ID to use when creating pull requests."
+   description: "GitHub App ID to use when creating pull requests. Required when dry-run is false."
    required: false
  github_app_private_key:
-   description: "GitHub App private key (PEM) to use when creating pull requests."
+   description: "GitHub App private key (PEM) to use when creating pull requests. Required when dry-run is false."
    required: false

This aligns with user expectations and makes the usage clearer, especially for users who attempt non-dry-run executions without these credentials.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between df00508 and 4b7e02f.

📒 Files selected for processing (5)
  • README.ko.md (1 hunks)
  • README.md (1 hunks)
  • action.yml (1 hunks)
  • src/git/pr_generator.rs (1 hunks)
  • src/main.rs (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • README.ko.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/main.rs
  • src/git/pr_generator.rs
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: reddevilmidzy
Repo: reddevilmidzy/queensac PR: 226
File: src/main.rs:21-32
Timestamp: 2025-09-22T15:50:19.531Z
Learning: User reddevilmidzy prefers to communicate in Korean and likes to keep PR scope focused and well-defined.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: build
  • GitHub Check: Analyze (rust)
🔇 Additional comments (3)
README.md (1)

34-36: Documentation now correctly reflects the GitHub App authentication approach.

The updated example properly demonstrates the new github_app_id and github_app_private_key inputs alongside the repo parameter, making the usage clear and consistent with the action.yml implementation.

action.yml (2)

27-33: Installation step is solid.

The rustup update and cargo install pattern is robust, with proper PATH management for subsequent steps.


34-56: Command construction and parameter handling are well-implemented.

The run step properly handles:

  • Environment variable mapping for GitHub App credentials (lines 37-38)
  • Conditional default for repo input (lines 43-45)
  • Conditional parameter addition for branch (lines 49-51) and dry-run (lines 53-55)
  • Array-based command construction to prevent word-splitting issues

Both steps use set -eo pipefail for robust error handling.

@reddevilmidzy reddevilmidzy merged commit eb22e48 into main Nov 12, 2025
10 checks passed
@reddevilmidzy reddevilmidzy deleted the action branch November 12, 2025 09:13
This was referenced Nov 15, 2025
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.

Set up GitHub Actions to work

2 participants