Skip to content

fix: pipe gh output to jq for Copilot review check#206

Merged
microsasa merged 3 commits intomainfrom
fix/quality-gate-jq-pipe
Mar 21, 2026
Merged

fix: pipe gh output to jq for Copilot review check#206
microsasa merged 3 commits intomainfrom
fix/quality-gate-jq-pipe

Conversation

@microsasa
Copy link
Owner

The --jq flag on gh run list doesn't support --arg. The command was silently failing and the || echo "1" fallback permanently blocked quality gate dispatch (always reported 'Copilot review in progress').

Fix: pipe gh run list --json output to jq separately, which supports --arg.

Copy link

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

Fixes the pipeline orchestrator’s “Copilot review running” check so it correctly filters workflow runs by HEAD_SHA, unblocking quality gate dispatch when the prior gh --jq --arg invocation was failing.

Changes:

  • Replace gh run list --jq --arg ... with gh run list --json ... | jq --arg ... so jq arguments are supported.
  • Preserve the existing failure fallback behavior while making the primary command reliable.

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

Copilot AI review requested due to automatic review settings March 21, 2026 06:55
gh run list's --jq flag doesn't support jq's --arg parameter.
The command errored silently and || echo "1" permanently
blocked quality gate dispatch.

Fixes #207

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy link

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.


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

When the orchestrator detects no valid approval on the current
commit but the label exists, remove the stale label before
dispatching the quality gate.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@microsasa microsasa force-pushed the fix/quality-gate-jq-pipe branch from 6f08e24 to a9963d0 Compare March 21, 2026 07:03
Copilot AI review requested due to automatic review settings March 21, 2026 07:03
Without this, the orchestrator doesn't fire after Copilot reviews
and relies on unreliable cron or manual kicks.

Closes #205

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy link

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.


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

@microsasa microsasa merged commit 56bcc72 into main Mar 21, 2026
6 checks passed
@microsasa microsasa deleted the fix/quality-gate-jq-pipe branch March 21, 2026 14:43
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