Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .agents/scripts/commands/pulse.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ perm=$(echo "$response" | tail -1 | jq -r '.permission // empty' 2>/dev/null)
# Idempotency guard: skip if already labelled (pulse runs every 2 minutes)
if ! gh pr view <number> --repo <slug> --json labels --jq '.labels[].name' 2>/dev/null | grep -q '^external-contributor$'; then
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 pr edit <number> --repo <slug> --add-label "external-contributor" 2>/dev/null || true
gh api "repos/<slug>/issues/<number>/labels" -X POST -f 'labels[]=external-contributor' 2>/dev/null || true
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Using 2>/dev/null suppresses all error output, which can hide underlying problems with authentication, network, or API changes, making debugging difficult. The project's scripting guidelines recommend avoiding blanket error suppression.

The gh api command includes a --silent flag that suppresses the successful JSON response on stdout without hiding genuine errors on stderr. Adopting this flag would make the command more robust and easier to debug.

Suggested change
gh api "repos/<slug>/issues/<number>/labels" -X POST -f 'labels[]=external-contributor' 2>/dev/null || true
gh api --silent "repos/<slug>/issues/<number>/labels" -X POST -f 'labels[]=external-contributor' || true

fi
```

Expand Down Expand Up @@ -243,7 +243,7 @@ gh pr comment <number> --repo <slug> --body "This PR appears orphaned — no act
2. **Add the `status:orphaned` label:**

```bash
gh pr edit <number> --repo <slug> --add-label "status:orphaned" 2>/dev/null || true
gh api "repos/<slug>/issues/<number>/labels" -X POST -f 'labels[]=status:orphaned' 2>/dev/null || true
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

As with the other change, using 2>/dev/null is not ideal as it hides all error messages. To improve debuggability and align with project guidelines, please use the --silent flag to suppress successful output while allowing errors to be reported to stderr.

Suggested change
gh api "repos/<slug>/issues/<number>/labels" -X POST -f 'labels[]=status:orphaned' 2>/dev/null || true
gh api --silent "repos/<slug>/issues/<number>/labels" -X POST -f 'labels[]=status:orphaned' || true

```

3. **Flag the corresponding issue for re-dispatch.** Find the issue referenced in the PR title (task ID pattern `tNNN:` or `Issue #NNN`). If the issue exists and is labelled `status:in-progress` or `status:in-review`, relabel it to `status:available` so the next dispatch cycle picks it up:
Expand Down
Loading