t2814: Remove 2>/dev/null from pulse external-contributor label API calls#2822
t2814: Remove 2>/dev/null from pulse external-contributor label API calls#2822alex-solovyev wants to merge 1 commit intomainfrom
Conversation
…tributor gate The gh api calls for adding the external-contributor label suppressed stderr with 2>/dev/null, masking auth, network, and API errors. The || true already prevents script exit on failure — stderr suppression was unnecessary and harmful for debugging. Closes #2814
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request improves the debuggability of the external-contributor gate script by ensuring that potential authentication, network, or API errors from Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
WalkthroughThis PR removes stderr redirection ( Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Suggested labels
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 unit tests (beta)
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.
Code Review
This pull request removes 2>/dev/null from two gh api calls in .agents/scripts/commands/pulse.md used for labeling external contributor pull requests. This change allows potential API, network, or authentication errors to be displayed, which is beneficial for debugging, while || true is retained to prevent script termination on failure. The changes correctly address the issue of suppressed error messages.
Note: Security Review has been skipped due to the limited scope of the PR.
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.agents/scripts/commands/pulse.md (1)
113-114: Nice consistency; consider grouping chained commands for clarity.Behavior is correct, and stderr visibility is now preserved. Optional: group the guarded block to make intent explicit and reduce shell-precedence ambiguity for future edits.
Optional clarity refactor
- gh pr comment <number> --repo <slug> --body "This PR is from an external contributor (@<author>). Auto-merge is disabled for external PRs — a maintainer must review and merge manually." \ - && gh api "repos/<slug>/issues/<number>/labels" -X POST -f 'labels[]=external-contributor' || true + { + gh pr comment <number> --repo <slug> --body "This PR is from an external contributor (@<author>). Auto-merge is disabled for external PRs — a maintainer must review and merge manually." \ + && gh api "repos/<slug>/issues/<number>/labels" -X POST -f 'labels[]=external-contributor' + } || true🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.agents/scripts/commands/pulse.md around lines 113 - 114, Group the two chained shell commands into a single guarded block so the intent is explicit and the entire sequence is short-circuited by the trailing || true; specifically, place the gh pr comment and gh api commands into one grouped block (e.g., using braces or a subshell) so the && between them is evaluated inside the group and then append || true to the group instead of to the second command alone, ensuring stderr visibility is preserved while making the control flow clearer.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In @.agents/scripts/commands/pulse.md:
- Around line 113-114: Group the two chained shell commands into a single
guarded block so the intent is explicit and the entire sequence is
short-circuited by the trailing || true; specifically, place the gh pr comment
and gh api commands into one grouped block (e.g., using braces or a subshell) so
the && between them is evaluated inside the group and then append || true to the
group instead of to the second command alone, ensuring stderr visibility is
preserved while making the control flow clearer.
ℹ️ Review info
Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 6b05556e-de55-42ab-98ac-cd50bcf089f9
📒 Files selected for processing (1)
.agents/scripts/commands/pulse.md
|
Closing — this change is superseded by PR #2810 (fix: move external-contributor idempotency guard from prompt to shell function). PR #2810 refactored the inline After rebasing onto main, this branch produces zero diff — the commit was dropped as empty. The underlying issue (stderr suppression masking errors) is fully resolved by the refactoring in #2810. |
Summary
2>/dev/nullstderr suppression from twogh apilabel POST calls in the external-contributor gate (lines 109 and 114)|| truealready prevents script exit on non-zero — the stderr suppression was masking auth, network, and API errors that are critical for debuggingChanges
File:
.agents/scripts/commands/pulse.mdBoth
gh api "repos/<slug>/issues/<number>/labels" -X POST -f 'labels[]=external-contributor'calls in the external-contributor section now allow stderr to flow through while still using|| trueto prevent script abort.Source
Gemini code review finding on PR #2803 (critical severity).
Closes #2814
Summary by CodeRabbit