Skip to content

fix: preserve gh run view passthrough args - #419

Closed
tsubasakong wants to merge 1 commit into
rtk-ai:developfrom
tsubasakong:lucas/issue-416-gh-run-view-job
Closed

tsubasakong wants to merge 1 commit into
rtk-ai:developfrom
tsubasakong:lucas/issue-416-gh-run-view-job

Conversation

@tsubasakong

@tsubasakong tsubasakong commented Mar 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • preserve raw passthrough for flag-only forms like gh run view --log-failed --job <job-id> by checking passthrough flags before extracting a positional run ID
  • treat short -j / -a forms the same as --job / --attempt when parsing gh run view arguments
  • add regression tests covering short-flag and flag-only argument combinations

Fixes #416.

Validation

  • cargo fmt --all --check
  • cargo clippy --all-targets
  • cargo test

@saimonmoore saimonmoore left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cool. Thanks a lot!

@pszymkowiak

Copy link
Copy Markdown
Collaborator

Hi! Thanks for the contribution! Since March 6, all PRs should target the develop branch instead of master (see CONTRIBUTING.md).

Could you update the base branch? Click Edit at the top right of this PR and change it from master to develop.

Thanks!

Signed-off-by: Frank <97429702+tsubasakong@users.noreply.github.com>
@tsubasakong
tsubasakong force-pushed the lucas/issue-416-gh-run-view-job branch from 70ab058 to b9442b4 Compare March 12, 2026 03:55
@tsubasakong
tsubasakong changed the base branch from master to develop March 12, 2026 03:55
@tsubasakong

Copy link
Copy Markdown
Contributor Author

Updated this PR to target develop and rebuilt it on top of current develop. The remaining diff is now just the passthrough-order + short-flag (-j / -a) fix, with local cargo fmt --all --check, cargo clippy --all-targets, and cargo test all passing.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@aeppling

Copy link
Copy Markdown
Contributor

Hey

We are cleaning up the codebase and improving the project structure for better onboarding. As part of this effort, PR #826 reorganizes src/ from a flat layout into subfolders.

No logic changes — only file moves and import path updates.

What you need to do

Rebase your branch on develop when receiving this comment:

git fetch origin && git rebase origin/develop

Git detects renames automatically. If you get import conflicts, update the paths:

use crate::git;        // now: use crate::cmds::git::git;
use crate::tracking;   // now: use crate::core::tracking;
use crate::config;     // now: use crate::core::config;
use crate::init;       // now: use crate::hooks::init;
use crate::gain;       // now: use crate::analytics::gain;

Need help rebasing? Tag @aeppling

@pszymkowiak

Copy link
Copy Markdown
Collaborator

Thanks @tsubasakong — the fix is correct and still needed: I checked current develop and the bug is unchanged (-j/-a missing from the value-flag list, and view_run extracts the run-id before the passthrough check, which reorders the args). Nicely tested too.

It needs a rebase onto develop — it's currently conflicting because the src/ reorganization (#826) moved the file to src/cmds/git/gh_cmd.rs. Heads-up while rebasing: view_run now returns Result<i32> (not Result<()>) and uses resolved_command("gh") instead of Command::new("gh"), so the passthrough return needs to be adapted to the new return type.

git fetch origin && git rebase origin/develop

Also the CLA still shows unsigned — please sign it so CI can run.

Ping me once it's rebased and I'll do a final pass.

@rtk-release-bot

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale due to 90 days of inactivity. If this pull request is still relevant, please leave any comment (for example, "bump"), and we'll keep it open. Your contribution is very much appreciated — we're sorry we haven't been able to review it yet.

@rtk-release-bot rtk-release-bot Bot added the stale label Sep 3, 2026
@rtk-release-bot

Copy link
Copy Markdown
Contributor

Closing this pull request after a prolonged period of inactivity. If this is still relevant, please ask for it to be reopened. Thank you!

@rtk-release-bot rtk-release-bot Bot closed this Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issue accepting arguments for gh run

5 participants