Skip to content

Fix hook route - #3795

Merged
openshift-merge-robot merged 1 commit into
openshift:masterfrom
hongkailiu:fixRoute
May 15, 2019
Merged

Fix hook route#3795
openshift-merge-robot merged 1 commit into
openshift:masterfrom
hongkailiu:fixRoute

Conversation

@hongkailiu

Copy link
Copy Markdown
Member

No description provided.

@openshift-ci-robot openshift-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels May 15, 2019
@stevekuznetsov

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label May 15, 2019
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hongkailiu, stevekuznetsov

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [hongkailiu,stevekuznetsov]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot
openshift-merge-robot merged commit 5ace01e into openshift:master May 15, 2019
@hongkailiu
hongkailiu deleted the fixRoute branch June 15, 2019 01:26
bryan-cox added a commit to bryan-cox/release that referenced this pull request Feb 9, 2026
The PR URL extraction used `grep | head -1` which picks the first
matching GitHub PR URL from Claude's entire stream-json output. When
Claude reads source files containing PR URL references in comments
(e.g. nodepool/token.go:104 references PR openshift#3795), that URL appears
before the `gh pr create` output, causing /auto-cc to be posted to
the wrong PR.

Switch to `tail -1` so the last matching URL is used, which is always
the one from `gh pr create` — the actual newly created PR.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
bryan-cox added a commit to bryan-cox/release that referenced this pull request Feb 9, 2026
The PR URL extraction used `grep | head -1` which picks the first
matching GitHub PR URL from Claude's entire stream-json output. When
Claude reads source files containing PR URL references in comments
(e.g. nodepool/token.go:104 references PR openshift#3795), that URL appears
before the `gh pr create` output, causing /auto-cc to be posted to
the wrong PR.

Replace the naive grep with a deterministic approach: extract all
candidate PR URLs from the output, deduplicate them, then use
`gh pr view` to check each PR's title against the current Jira
ticket ID. jira-solve PRs always have the ticket ID at the start
of the title (e.g. "CNTRLPLANE-625: ..."), so this reliably
identifies the correct PR.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
bryan-cox added a commit to bryan-cox/release that referenced this pull request Feb 9, 2026
The PR URL extraction used `grep | head -1` which picks the first
matching GitHub PR URL from Claude's entire stream-json output. When
Claude reads source files containing PR URL references in comments
(e.g. nodepool/token.go:104 references PR openshift#3795), that URL appears
before the `gh pr create` output, causing /auto-cc to be posted to
the wrong PR.

Replace the naive grep with a deterministic approach: extract all
candidate PR URLs from the output, deduplicate them, then use
`gh pr view` to check each PR's title and author. Match the PR
whose title starts with the current Jira ticket ID (e.g.
"CNTRLPLANE-625: ...") and whose author is the hypershift-jira-
solve-ci bot.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
bryan-cox added a commit to bryan-cox/release that referenced this pull request Feb 9, 2026
The PR URL extraction used `grep | head -1` which picks the first
matching GitHub PR URL from Claude's entire stream-json output. When
Claude reads source files containing PR URL references in comments
(e.g. nodepool/token.go:104 references PR openshift#3795), that URL appears
before the `gh pr create` output, causing /auto-cc to be posted to
the wrong PR.

Replace the naive grep with a deterministic approach: extract all
candidate PR URLs from the output, deduplicate them, then use
`gh pr view` to check each PR's title and author. Match the PR
whose title starts with the current Jira ticket ID (e.g.
"CNTRLPLANE-625: ...") and whose author is the hypershift-jira-
solve-ci bot.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
bryan-cox added a commit to bryan-cox/release that referenced this pull request Feb 9, 2026
The PR URL extraction used `grep | head -1` which picks the first
matching GitHub PR URL from Claude's entire stream-json output. When
Claude reads source files containing PR URL references in comments
(e.g. nodepool/token.go:104 references PR openshift#3795), that URL appears
before the `gh pr create` output, causing /auto-cc to be posted to
the wrong PR.

Replace the naive grep with a two-strategy hybrid approach:

Strategy 1 (primary): Parse Claude's structured JSONL output to find
tool_use blocks where the Bash command contains "gh pr create", then
correlate their IDs with matching tool_result blocks to extract the
actual PR URL. This is deterministic and requires zero GitHub API calls.

Strategy 2 (fallback): If JSONL parsing finds nothing (missing file,
schema change, malformed output), fall back to extracting all candidate
URLs and verifying each via `gh pr view` to find the one whose title
starts with the current Jira ticket ID and whose author is the
hypershift-jira-solve-ci bot.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
bryan-cox added a commit to bryan-cox/release that referenced this pull request Feb 10, 2026
The PR URL extraction used `grep | head -1` which picks the first
matching GitHub PR URL from Claude's entire stream-json output. When
Claude reads source files containing PR URL references in comments
(e.g. nodepool/token.go:104 references PR openshift#3795), that URL appears
before the `gh pr create` output, causing /auto-cc to be posted to
the wrong PR.

Replace the naive grep with a two-strategy hybrid approach:

Strategy 1 (primary): Parse Claude's structured JSONL output to find
tool_use blocks where the Bash command contains "gh pr create", then
correlate their IDs with matching tool_result blocks to extract the
actual PR URL. This is deterministic and requires zero GitHub API calls.

Strategy 2 (fallback): If JSONL parsing finds nothing (missing file,
schema change, malformed output), fall back to extracting all candidate
URLs and verifying each via `gh pr view` to find the one whose title
starts with the current Jira ticket ID and whose author is the
hypershift-jira-solve-ci bot.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
openshift-merge-bot Bot pushed a commit that referenced this pull request Feb 10, 2026
#74612)

The PR URL extraction used `grep | head -1` which picks the first
matching GitHub PR URL from Claude's entire stream-json output. When
Claude reads source files containing PR URL references in comments
(e.g. nodepool/token.go:104 references PR #3795), that URL appears
before the `gh pr create` output, causing /auto-cc to be posted to
the wrong PR.

Replace the naive grep with a two-strategy hybrid approach:

Strategy 1 (primary): Parse Claude's structured JSONL output to find
tool_use blocks where the Bash command contains "gh pr create", then
correlate their IDs with matching tool_result blocks to extract the
actual PR URL. This is deterministic and requires zero GitHub API calls.

Strategy 2 (fallback): If JSONL parsing finds nothing (missing file,
schema change, malformed output), fall back to extracting all candidate
URLs and verifying each via `gh pr view` to find the one whose title
starts with the current Jira ticket ID and whose author is the
hypershift-jira-solve-ci bot.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
gpei pushed a commit to gpei/release that referenced this pull request Feb 18, 2026
openshift#74612)

The PR URL extraction used `grep | head -1` which picks the first
matching GitHub PR URL from Claude's entire stream-json output. When
Claude reads source files containing PR URL references in comments
(e.g. nodepool/token.go:104 references PR openshift#3795), that URL appears
before the `gh pr create` output, causing /auto-cc to be posted to
the wrong PR.

Replace the naive grep with a two-strategy hybrid approach:

Strategy 1 (primary): Parse Claude's structured JSONL output to find
tool_use blocks where the Bash command contains "gh pr create", then
correlate their IDs with matching tool_result blocks to extract the
actual PR URL. This is deterministic and requires zero GitHub API calls.

Strategy 2 (fallback): If JSONL parsing finds nothing (missing file,
schema change, malformed output), fall back to extracting all candidate
URLs and verifying each via `gh pr view` to find the one whose title
starts with the current Jira ticket ID and whose author is the
hypershift-jira-solve-ci bot.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
richardsonnick pushed a commit to richardsonnick/release that referenced this pull request Feb 18, 2026
openshift#74612)

The PR URL extraction used `grep | head -1` which picks the first
matching GitHub PR URL from Claude's entire stream-json output. When
Claude reads source files containing PR URL references in comments
(e.g. nodepool/token.go:104 references PR openshift#3795), that URL appears
before the `gh pr create` output, causing /auto-cc to be posted to
the wrong PR.

Replace the naive grep with a two-strategy hybrid approach:

Strategy 1 (primary): Parse Claude's structured JSONL output to find
tool_use blocks where the Bash command contains "gh pr create", then
correlate their IDs with matching tool_result blocks to extract the
actual PR URL. This is deterministic and requires zero GitHub API calls.

Strategy 2 (fallback): If JSONL parsing finds nothing (missing file,
schema change, malformed output), fall back to extracting all candidate
URLs and verifying each via `gh pr view` to find the one whose title
starts with the current Jira ticket ID and whose author is the
hypershift-jira-solve-ci bot.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
memodi pushed a commit to memodi/release that referenced this pull request Feb 18, 2026
openshift#74612)

The PR URL extraction used `grep | head -1` which picks the first
matching GitHub PR URL from Claude's entire stream-json output. When
Claude reads source files containing PR URL references in comments
(e.g. nodepool/token.go:104 references PR openshift#3795), that URL appears
before the `gh pr create` output, causing /auto-cc to be posted to
the wrong PR.

Replace the naive grep with a two-strategy hybrid approach:

Strategy 1 (primary): Parse Claude's structured JSONL output to find
tool_use blocks where the Bash command contains "gh pr create", then
correlate their IDs with matching tool_result blocks to extract the
actual PR URL. This is deterministic and requires zero GitHub API calls.

Strategy 2 (fallback): If JSONL parsing finds nothing (missing file,
schema change, malformed output), fall back to extracting all candidate
URLs and verifying each via `gh pr view` to find the one whose title
starts with the current Jira ticket ID and whose author is the
hypershift-jira-solve-ci bot.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
dhensel-rh pushed a commit to dhensel-rh/release that referenced this pull request Feb 19, 2026
openshift#74612)

The PR URL extraction used `grep | head -1` which picks the first
matching GitHub PR URL from Claude's entire stream-json output. When
Claude reads source files containing PR URL references in comments
(e.g. nodepool/token.go:104 references PR openshift#3795), that URL appears
before the `gh pr create` output, causing /auto-cc to be posted to
the wrong PR.

Replace the naive grep with a two-strategy hybrid approach:

Strategy 1 (primary): Parse Claude's structured JSONL output to find
tool_use blocks where the Bash command contains "gh pr create", then
correlate their IDs with matching tool_result blocks to extract the
actual PR URL. This is deterministic and requires zero GitHub API calls.

Strategy 2 (fallback): If JSONL parsing finds nothing (missing file,
schema change, malformed output), fall back to extracting all candidate
URLs and verifying each via `gh pr view` to find the one whose title
starts with the current Jira ticket ID and whose author is the
hypershift-jira-solve-ci bot.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
rrasouli pushed a commit to rrasouli/release that referenced this pull request Mar 3, 2026
openshift#74612)

The PR URL extraction used `grep | head -1` which picks the first
matching GitHub PR URL from Claude's entire stream-json output. When
Claude reads source files containing PR URL references in comments
(e.g. nodepool/token.go:104 references PR openshift#3795), that URL appears
before the `gh pr create` output, causing /auto-cc to be posted to
the wrong PR.

Replace the naive grep with a two-strategy hybrid approach:

Strategy 1 (primary): Parse Claude's structured JSONL output to find
tool_use blocks where the Bash command contains "gh pr create", then
correlate their IDs with matching tool_result blocks to extract the
actual PR URL. This is deterministic and requires zero GitHub API calls.

Strategy 2 (fallback): If JSONL parsing finds nothing (missing file,
schema change, malformed output), fall back to extracting all candidate
URLs and verifying each via `gh pr view` to find the one whose title
starts with the current Jira ticket ID and whose author is the
hypershift-jira-solve-ci bot.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
kannon92 pushed a commit to kannon92/release that referenced this pull request Mar 3, 2026
openshift#74612)

The PR URL extraction used `grep | head -1` which picks the first
matching GitHub PR URL from Claude's entire stream-json output. When
Claude reads source files containing PR URL references in comments
(e.g. nodepool/token.go:104 references PR openshift#3795), that URL appears
before the `gh pr create` output, causing /auto-cc to be posted to
the wrong PR.

Replace the naive grep with a two-strategy hybrid approach:

Strategy 1 (primary): Parse Claude's structured JSONL output to find
tool_use blocks where the Bash command contains "gh pr create", then
correlate their IDs with matching tool_result blocks to extract the
actual PR URL. This is deterministic and requires zero GitHub API calls.

Strategy 2 (fallback): If JSONL parsing finds nothing (missing file,
schema change, malformed output), fall back to extracting all candidate
URLs and verifying each via `gh pr view` to find the one whose title
starts with the current Jira ticket ID and whose author is the
hypershift-jira-solve-ci bot.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
wangke19 pushed a commit to wangke19/release that referenced this pull request Mar 4, 2026
openshift#74612)

The PR URL extraction used `grep | head -1` which picks the first
matching GitHub PR URL from Claude's entire stream-json output. When
Claude reads source files containing PR URL references in comments
(e.g. nodepool/token.go:104 references PR openshift#3795), that URL appears
before the `gh pr create` output, causing /auto-cc to be posted to
the wrong PR.

Replace the naive grep with a two-strategy hybrid approach:

Strategy 1 (primary): Parse Claude's structured JSONL output to find
tool_use blocks where the Bash command contains "gh pr create", then
correlate their IDs with matching tool_result blocks to extract the
actual PR URL. This is deterministic and requires zero GitHub API calls.

Strategy 2 (fallback): If JSONL parsing finds nothing (missing file,
schema change, malformed output), fall back to extracting all candidate
URLs and verifying each via `gh pr view` to find the one whose title
starts with the current Jira ticket ID and whose author is the
hypershift-jira-solve-ci bot.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
rrasouli pushed a commit to rrasouli/release that referenced this pull request Mar 5, 2026
openshift#74612)

The PR URL extraction used `grep | head -1` which picks the first
matching GitHub PR URL from Claude's entire stream-json output. When
Claude reads source files containing PR URL references in comments
(e.g. nodepool/token.go:104 references PR openshift#3795), that URL appears
before the `gh pr create` output, causing /auto-cc to be posted to
the wrong PR.

Replace the naive grep with a two-strategy hybrid approach:

Strategy 1 (primary): Parse Claude's structured JSONL output to find
tool_use blocks where the Bash command contains "gh pr create", then
correlate their IDs with matching tool_result blocks to extract the
actual PR URL. This is deterministic and requires zero GitHub API calls.

Strategy 2 (fallback): If JSONL parsing finds nothing (missing file,
schema change, malformed output), fall back to extracting all candidate
URLs and verifying each via `gh pr view` to find the one whose title
starts with the current Jira ticket ID and whose author is the
hypershift-jira-solve-ci bot.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
weinliu pushed a commit to weinliu/release that referenced this pull request Mar 6, 2026
openshift#74612)

The PR URL extraction used `grep | head -1` which picks the first
matching GitHub PR URL from Claude's entire stream-json output. When
Claude reads source files containing PR URL references in comments
(e.g. nodepool/token.go:104 references PR openshift#3795), that URL appears
before the `gh pr create` output, causing /auto-cc to be posted to
the wrong PR.

Replace the naive grep with a two-strategy hybrid approach:

Strategy 1 (primary): Parse Claude's structured JSONL output to find
tool_use blocks where the Bash command contains "gh pr create", then
correlate their IDs with matching tool_result blocks to extract the
actual PR URL. This is deterministic and requires zero GitHub API calls.

Strategy 2 (fallback): If JSONL parsing finds nothing (missing file,
schema change, malformed output), fall back to extracting all candidate
URLs and verifying each via `gh pr view` to find the one whose title
starts with the current Jira ticket ID and whose author is the
hypershift-jira-solve-ci bot.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
sdodson pushed a commit to sdodson/release that referenced this pull request Mar 8, 2026
openshift#74612)

The PR URL extraction used `grep | head -1` which picks the first
matching GitHub PR URL from Claude's entire stream-json output. When
Claude reads source files containing PR URL references in comments
(e.g. nodepool/token.go:104 references PR openshift#3795), that URL appears
before the `gh pr create` output, causing /auto-cc to be posted to
the wrong PR.

Replace the naive grep with a two-strategy hybrid approach:

Strategy 1 (primary): Parse Claude's structured JSONL output to find
tool_use blocks where the Bash command contains "gh pr create", then
correlate their IDs with matching tool_result blocks to extract the
actual PR URL. This is deterministic and requires zero GitHub API calls.

Strategy 2 (fallback): If JSONL parsing finds nothing (missing file,
schema change, malformed output), fall back to extracting all candidate
URLs and verifying each via `gh pr view` to find the one whose title
starts with the current Jira ticket ID and whose author is the
hypershift-jira-solve-ci bot.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
kasturinarra pushed a commit to kasturinarra/release that referenced this pull request Mar 11, 2026
openshift#74612)

The PR URL extraction used `grep | head -1` which picks the first
matching GitHub PR URL from Claude's entire stream-json output. When
Claude reads source files containing PR URL references in comments
(e.g. nodepool/token.go:104 references PR openshift#3795), that URL appears
before the `gh pr create` output, causing /auto-cc to be posted to
the wrong PR.

Replace the naive grep with a two-strategy hybrid approach:

Strategy 1 (primary): Parse Claude's structured JSONL output to find
tool_use blocks where the Bash command contains "gh pr create", then
correlate their IDs with matching tool_result blocks to extract the
actual PR URL. This is deterministic and requires zero GitHub API calls.

Strategy 2 (fallback): If JSONL parsing finds nothing (missing file,
schema change, malformed output), fall back to extracting all candidate
URLs and verifying each via `gh pr view` to find the one whose title
starts with the current Jira ticket ID and whose author is the
hypershift-jira-solve-ci bot.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
tareqalayan pushed a commit to tareqalayan/release that referenced this pull request Mar 13, 2026
openshift#74612)

The PR URL extraction used `grep | head -1` which picks the first
matching GitHub PR URL from Claude's entire stream-json output. When
Claude reads source files containing PR URL references in comments
(e.g. nodepool/token.go:104 references PR openshift#3795), that URL appears
before the `gh pr create` output, causing /auto-cc to be posted to
the wrong PR.

Replace the naive grep with a two-strategy hybrid approach:

Strategy 1 (primary): Parse Claude's structured JSONL output to find
tool_use blocks where the Bash command contains "gh pr create", then
correlate their IDs with matching tool_result blocks to extract the
actual PR URL. This is deterministic and requires zero GitHub API calls.

Strategy 2 (fallback): If JSONL parsing finds nothing (missing file,
schema change, malformed output), fall back to extracting all candidate
URLs and verifying each via `gh pr view` to find the one whose title
starts with the current Jira ticket ID and whose author is the
hypershift-jira-solve-ci bot.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
qiliRedHat pushed a commit to qiliRedHat/release that referenced this pull request Mar 13, 2026
openshift#74612)

The PR URL extraction used `grep | head -1` which picks the first
matching GitHub PR URL from Claude's entire stream-json output. When
Claude reads source files containing PR URL references in comments
(e.g. nodepool/token.go:104 references PR openshift#3795), that URL appears
before the `gh pr create` output, causing /auto-cc to be posted to
the wrong PR.

Replace the naive grep with a two-strategy hybrid approach:

Strategy 1 (primary): Parse Claude's structured JSONL output to find
tool_use blocks where the Bash command contains "gh pr create", then
correlate their IDs with matching tool_result blocks to extract the
actual PR URL. This is deterministic and requires zero GitHub API calls.

Strategy 2 (fallback): If JSONL parsing finds nothing (missing file,
schema change, malformed output), fall back to extracting all candidate
URLs and verifying each via `gh pr view` to find the one whose title
starts with the current Jira ticket ID and whose author is the
hypershift-jira-solve-ci bot.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
MayXuQQ pushed a commit to MayXuQQ/release that referenced this pull request Mar 17, 2026
openshift#74612)

The PR URL extraction used `grep | head -1` which picks the first
matching GitHub PR URL from Claude's entire stream-json output. When
Claude reads source files containing PR URL references in comments
(e.g. nodepool/token.go:104 references PR openshift#3795), that URL appears
before the `gh pr create` output, causing /auto-cc to be posted to
the wrong PR.

Replace the naive grep with a two-strategy hybrid approach:

Strategy 1 (primary): Parse Claude's structured JSONL output to find
tool_use blocks where the Bash command contains "gh pr create", then
correlate their IDs with matching tool_result blocks to extract the
actual PR URL. This is deterministic and requires zero GitHub API calls.

Strategy 2 (fallback): If JSONL parsing finds nothing (missing file,
schema change, malformed output), fall back to extracting all candidate
URLs and verifying each via `gh pr view` to find the one whose title
starts with the current Jira ticket ID and whose author is the
hypershift-jira-solve-ci bot.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
kasturinarra pushed a commit to kasturinarra/release that referenced this pull request Mar 17, 2026
openshift#74612)

The PR URL extraction used `grep | head -1` which picks the first
matching GitHub PR URL from Claude's entire stream-json output. When
Claude reads source files containing PR URL references in comments
(e.g. nodepool/token.go:104 references PR openshift#3795), that URL appears
before the `gh pr create` output, causing /auto-cc to be posted to
the wrong PR.

Replace the naive grep with a two-strategy hybrid approach:

Strategy 1 (primary): Parse Claude's structured JSONL output to find
tool_use blocks where the Bash command contains "gh pr create", then
correlate their IDs with matching tool_result blocks to extract the
actual PR URL. This is deterministic and requires zero GitHub API calls.

Strategy 2 (fallback): If JSONL parsing finds nothing (missing file,
schema change, malformed output), fall back to extracting all candidate
URLs and verifying each via `gh pr view` to find the one whose title
starts with the current Jira ticket ID and whose author is the
hypershift-jira-solve-ci bot.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
sairameshv pushed a commit to sairameshv/release that referenced this pull request Mar 23, 2026
openshift#74612)

The PR URL extraction used `grep | head -1` which picks the first
matching GitHub PR URL from Claude's entire stream-json output. When
Claude reads source files containing PR URL references in comments
(e.g. nodepool/token.go:104 references PR openshift#3795), that URL appears
before the `gh pr create` output, causing /auto-cc to be posted to
the wrong PR.

Replace the naive grep with a two-strategy hybrid approach:

Strategy 1 (primary): Parse Claude's structured JSONL output to find
tool_use blocks where the Bash command contains "gh pr create", then
correlate their IDs with matching tool_result blocks to extract the
actual PR URL. This is deterministic and requires zero GitHub API calls.

Strategy 2 (fallback): If JSONL parsing finds nothing (missing file,
schema change, malformed output), fall back to extracting all candidate
URLs and verifying each via `gh pr view` to find the one whose title
starts with the current Jira ticket ID and whose author is the
hypershift-jira-solve-ci bot.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
zhouying7780 pushed a commit to zhouying7780/release that referenced this pull request Mar 25, 2026
openshift#74612)

The PR URL extraction used `grep | head -1` which picks the first
matching GitHub PR URL from Claude's entire stream-json output. When
Claude reads source files containing PR URL references in comments
(e.g. nodepool/token.go:104 references PR openshift#3795), that URL appears
before the `gh pr create` output, causing /auto-cc to be posted to
the wrong PR.

Replace the naive grep with a two-strategy hybrid approach:

Strategy 1 (primary): Parse Claude's structured JSONL output to find
tool_use blocks where the Bash command contains "gh pr create", then
correlate their IDs with matching tool_result blocks to extract the
actual PR URL. This is deterministic and requires zero GitHub API calls.

Strategy 2 (fallback): If JSONL parsing finds nothing (missing file,
schema change, malformed output), fall back to extracting all candidate
URLs and verifying each via `gh pr view` to find the one whose title
starts with the current Jira ticket ID and whose author is the
hypershift-jira-solve-ci bot.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
rrasouli pushed a commit to rrasouli/release that referenced this pull request Mar 25, 2026
openshift#74612)

The PR URL extraction used `grep | head -1` which picks the first
matching GitHub PR URL from Claude's entire stream-json output. When
Claude reads source files containing PR URL references in comments
(e.g. nodepool/token.go:104 references PR openshift#3795), that URL appears
before the `gh pr create` output, causing /auto-cc to be posted to
the wrong PR.

Replace the naive grep with a two-strategy hybrid approach:

Strategy 1 (primary): Parse Claude's structured JSONL output to find
tool_use blocks where the Bash command contains "gh pr create", then
correlate their IDs with matching tool_result blocks to extract the
actual PR URL. This is deterministic and requires zero GitHub API calls.

Strategy 2 (fallback): If JSONL parsing finds nothing (missing file,
schema change, malformed output), fall back to extracting all candidate
URLs and verifying each via `gh pr view` to find the one whose title
starts with the current Jira ticket ID and whose author is the
hypershift-jira-solve-ci bot.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
anpingli pushed a commit to anpingli/release that referenced this pull request Mar 30, 2026
openshift#74612)

The PR URL extraction used `grep | head -1` which picks the first
matching GitHub PR URL from Claude's entire stream-json output. When
Claude reads source files containing PR URL references in comments
(e.g. nodepool/token.go:104 references PR openshift#3795), that URL appears
before the `gh pr create` output, causing /auto-cc to be posted to
the wrong PR.

Replace the naive grep with a two-strategy hybrid approach:

Strategy 1 (primary): Parse Claude's structured JSONL output to find
tool_use blocks where the Bash command contains "gh pr create", then
correlate their IDs with matching tool_result blocks to extract the
actual PR URL. This is deterministic and requires zero GitHub API calls.

Strategy 2 (fallback): If JSONL parsing finds nothing (missing file,
schema change, malformed output), fall back to extracting all candidate
URLs and verifying each via `gh pr view` to find the one whose title
starts with the current Jira ticket ID and whose author is the
hypershift-jira-solve-ci bot.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
eliorerz pushed a commit to eliorerz/release that referenced this pull request Jun 3, 2026
openshift#74612)

The PR URL extraction used `grep | head -1` which picks the first
matching GitHub PR URL from Claude's entire stream-json output. When
Claude reads source files containing PR URL references in comments
(e.g. nodepool/token.go:104 references PR openshift#3795), that URL appears
before the `gh pr create` output, causing /auto-cc to be posted to
the wrong PR.

Replace the naive grep with a two-strategy hybrid approach:

Strategy 1 (primary): Parse Claude's structured JSONL output to find
tool_use blocks where the Bash command contains "gh pr create", then
correlate their IDs with matching tool_result blocks to extract the
actual PR URL. This is deterministic and requires zero GitHub API calls.

Strategy 2 (fallback): If JSONL parsing finds nothing (missing file,
schema change, malformed output), fall back to extracting all candidate
URLs and verifying each via `gh pr view` to find the one whose title
starts with the current Jira ticket ID and whose author is the
hypershift-jira-solve-ci bot.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
fjglira pushed a commit to fjglira/release that referenced this pull request Jun 3, 2026
openshift#74612)

The PR URL extraction used `grep | head -1` which picks the first
matching GitHub PR URL from Claude's entire stream-json output. When
Claude reads source files containing PR URL references in comments
(e.g. nodepool/token.go:104 references PR openshift#3795), that URL appears
before the `gh pr create` output, causing /auto-cc to be posted to
the wrong PR.

Replace the naive grep with a two-strategy hybrid approach:

Strategy 1 (primary): Parse Claude's structured JSONL output to find
tool_use blocks where the Bash command contains "gh pr create", then
correlate their IDs with matching tool_result blocks to extract the
actual PR URL. This is deterministic and requires zero GitHub API calls.

Strategy 2 (fallback): If JSONL parsing finds nothing (missing file,
schema change, malformed output), fall back to extracting all candidate
URLs and verifying each via `gh pr view` to find the one whose title
starts with the current Jira ticket ID and whose author is the
hypershift-jira-solve-ci bot.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
andrej1991 pushed a commit to andrej1991/release that referenced this pull request Jul 6, 2026
openshift#74612)

The PR URL extraction used `grep | head -1` which picks the first
matching GitHub PR URL from Claude's entire stream-json output. When
Claude reads source files containing PR URL references in comments
(e.g. nodepool/token.go:104 references PR openshift#3795), that URL appears
before the `gh pr create` output, causing /auto-cc to be posted to
the wrong PR.

Replace the naive grep with a two-strategy hybrid approach:

Strategy 1 (primary): Parse Claude's structured JSONL output to find
tool_use blocks where the Bash command contains "gh pr create", then
correlate their IDs with matching tool_result blocks to extract the
actual PR URL. This is deterministic and requires zero GitHub API calls.

Strategy 2 (fallback): If JSONL parsing finds nothing (missing file,
schema change, malformed output), fall back to extracting all candidate
URLs and verifying each via `gh pr view` to find the one whose title
starts with the current Jira ticket ID and whose author is the
hypershift-jira-solve-ci bot.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
SachinNinganure pushed a commit to SachinNinganure/release that referenced this pull request Jul 20, 2026
openshift#74612)

The PR URL extraction used `grep | head -1` which picks the first
matching GitHub PR URL from Claude's entire stream-json output. When
Claude reads source files containing PR URL references in comments
(e.g. nodepool/token.go:104 references PR openshift#3795), that URL appears
before the `gh pr create` output, causing /auto-cc to be posted to
the wrong PR.

Replace the naive grep with a two-strategy hybrid approach:

Strategy 1 (primary): Parse Claude's structured JSONL output to find
tool_use blocks where the Bash command contains "gh pr create", then
correlate their IDs with matching tool_result blocks to extract the
actual PR URL. This is deterministic and requires zero GitHub API calls.

Strategy 2 (fallback): If JSONL parsing finds nothing (missing file,
schema change, malformed output), fall back to extracting all candidate
URLs and verifying each via `gh pr view` to find the one whose title
starts with the current Jira ticket ID and whose author is the
hypershift-jira-solve-ci bot.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
malingatembo pushed a commit to malingatembo/release that referenced this pull request Aug 5, 2026
openshift#74612)

The PR URL extraction used `grep | head -1` which picks the first
matching GitHub PR URL from Claude's entire stream-json output. When
Claude reads source files containing PR URL references in comments
(e.g. nodepool/token.go:104 references PR openshift#3795), that URL appears
before the `gh pr create` output, causing /auto-cc to be posted to
the wrong PR.

Replace the naive grep with a two-strategy hybrid approach:

Strategy 1 (primary): Parse Claude's structured JSONL output to find
tool_use blocks where the Bash command contains "gh pr create", then
correlate their IDs with matching tool_result blocks to extract the
actual PR URL. This is deterministic and requires zero GitHub API calls.

Strategy 2 (fallback): If JSONL parsing finds nothing (missing file,
schema change, malformed output), fall back to extracting all candidate
URLs and verifying each via `gh pr view` to find the one whose title
starts with the current Jira ticket ID and whose author is the
hypershift-jira-solve-ci bot.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants