fix: pipe gh output to jq for Copilot review check#206
Conversation
There was a problem hiding this comment.
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 ...withgh 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.
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>
7a8a257 to
169098b
Compare
There was a problem hiding this comment.
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>
6f08e24 to
a9963d0
Compare
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>
There was a problem hiding this comment.
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.
The
--jqflag ongh run listdoesn'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 --jsonoutput tojqseparately, which supports--arg.