Skip to content

feat(fleet-monitor): raise issues in the repo they pertain to - #331

Merged
don-petry merged 4 commits into
mainfrom
feat/fleet-monitor-cross-repo-issues
May 21, 2026
Merged

feat(fleet-monitor): raise issues in the repo they pertain to#331
don-petry merged 4 commits into
mainfrom
feat/fleet-monitor-cross-repo-issues

Conversation

@don-petry

@don-petry don-petry commented May 21, 2026

Copy link
Copy Markdown
Collaborator

Problem

Fleet Monitor creates per-workflow tracking issues in .github-private regardless of which repo the failing workflow lives in. This means issues like #315 (about broodly/terraform.yml) land in the wrong repo, disconnected from the code that needs fixing.

Changes

scripts/fleet_monitor.sh — issue lookup (step 2b)

Switch from querying only GITHUB_REPOSITORY (.github-private) to an org-wide search/issues query so the report's inline issue links resolve correctly after issues move to their target repos.

.github/workflows/actions-fleet-monitor.yml

New step: "Migrate misaligned fleet-tracker issues" (runs before tracking)

  • Lists all open fleet-tracker issues in .github-private with [Fleet Monitor] titles
  • Transfers each one to its correct target repo using GraphQL transferIssue (createLabelsIfMissing: true copies labels automatically)
  • Soft-fails per issue so a single inaccessible repo can't block the whole step
  • Idempotent: once all issues are in the right place, the step finds nothing to migrate

Updated step: "Track high-failure workflows as Issues"

  • Creates/updates issues in the target repo (owner/repo parsed from item.repo) instead of .github-private
  • Switches token from github.token (only has issues:write on .github-private) to GH_PAT_WORKFLOWS for cross-repo issues:write
  • Ensures labels once per target repo via a Set guard (avoids redundant API calls)
  • Searches for existing open issues in the target repo before create vs. update

Closes #315

Summary by CodeRabbit

  • Improvements
    • Fleet issue tracking now operates organization-wide instead of being limited to a single repository.
    • Fleet-tracker issues are automatically migrated to their intended target repositories.
    • Required labels are automatically created and managed in target repositories for workflow health monitoring.

Review Change Stack

- Track high-failure workflows: create/update issues in the target
  repo (owner/repo parsed from item.repo) instead of .github-private.
  Switch token from github.token to GH_PAT_WORKFLOWS for cross-repo
  issues:write. Ensure labels once per target repo via a Set guard.

- Migrate misaligned issues: new step before tracking runs a one-shot
  migration using GraphQL transferIssue to move any open fleet-tracker
  issues currently in .github-private to their correct target repos.
  createLabelsIfMissing copies labels automatically. Soft-fails per
  issue so a single inaccessible repo can't block the whole step.

- Issue lookup (fleet_monitor.sh step 2b): switch from querying only
  GITHUB_REPOSITORY to an org-wide search/issues query so the report's
  inline issue links resolve correctly after migration.

Closes #315

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 21, 2026 00:50
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai

coderabbitai Bot commented May 21, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@don-petry has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 48 minutes and 36 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: dfe197c3-e12a-42de-8b9f-88b56282f5d7

📥 Commits

Reviewing files that changed from the base of the PR and between 1b060a8 and 8c7bf0b.

📒 Files selected for processing (3)
  • .github/workflows/actions-fleet-monitor.yml
  • .github/workflows/issue-triage-runner.yml
  • scripts/fleet_monitor.sh
📝 Walkthrough

Walkthrough

Fleet monitor now discovers fleet-tracker issues org-wide via script API search, migrates misaligned issues from .github-private to their target repositories in a new workflow step using GraphQL transfers, and refactors the high-failure tracking step to create and update issues per target repository with idempotent label management.

Changes

Fleet Monitor: Org-wide Issue Discovery and Per-Repo Tracking

Layer / File(s) Summary
Org-wide fleet-tracker issue discovery
scripts/fleet_monitor.sh
Script replaces repo-scoped issue listing with org-wide gh api search/issues query filtering open issues by title prefix [Fleet Monitor], enabling discovery across the entire organization instead of a single repo.
Issue migration and authentication clarification
.github/workflows/actions-fleet-monitor.yml
Workflow comments clarify that migration and tracking steps use GH_PAT_WORKFLOWS for cross-repo issues:write. New "Migrate misaligned fleet-tracker issues" step paginates issues from .github-private, parses [Fleet Monitor] owner/repo — workflow.yml titles, and transfers matching issues to intended target repositories via GraphQL mutations with idempotent label bootstrap.
Per-target-repo high-failure issue tracking
.github/workflows/actions-fleet-monitor.yml
"Track high-failure workflows as Issues" step refactored to iterate over target repositories from fleet_high_failure.json. Ensures required labels (dev-lead, fleet-tracker, health-check) exist in each target repo once via idempotent 422 handling, searches and creates/updates issues in the target repo by exact title match.

Sequence Diagram

sequenceDiagram
  participant script as fleet_monitor.sh
  participant api as GitHub API
  participant migration as Migration Step
  participant target as Target Repository

  script->>api: Search org-wide fleet-tracker issues
  api-->>script: Open issues with [Fleet Monitor] titles
  script->>script: Extract repo/workflow from titles
  
  migration->>api: Paginate fleet-tracker issues in .github-private
  api-->>migration: Issues with target repo info
  migration->>api: transferIssue mutation
  api->>target: Transfer issue to target repo
  target-->>api: Issue transferred
  api-->>migration: Transfer success
  migration->>migration: Log migration completion
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • petry-projects/.github-private#197: Both PRs extend scripts/fleet_monitor.sh to build the issues_lookup_file with org-wide fleet-tracker issue search.
  • petry-projects/.github-private#231: Both PRs refactor .github/workflows/actions-fleet-monitor.yml's "Track high-failure workflows as Issues" step to upsert issues using deterministic [Fleet Monitor] ... titles and consistent label handling.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and clearly summarizes the main objective: changing Fleet Monitor to create issues in the repository where workflows belong, rather than always using .github-private.
Linked Issues check ✅ Passed The PR fully addresses issue #315 by implementing cross-repo issue creation so the failing terraform.yml workflow in petry-projects/broodly now gets tracked with an issue in that repository instead of .github-private.
Out of Scope Changes check ✅ Passed All changes are directly scoped to the Fleet Monitor issue tracking mechanism: scripts/fleet_monitor.sh queries org-wide issues, and the workflow migrates existing issues and creates new ones in target repos with proper label management.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/fleet-monitor-cross-repo-issues

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Actions Fleet Monitor automation so that workflow-tracking issues are created (and migrated) into the repository where the failing workflow actually lives, instead of always landing in petry-projects/.github-private. This keeps tracking issues co-located with the code that needs fixing and resolves misfiled issues like #315.

Changes:

  • Switch issue lookup in fleet_monitor.sh from repo-scoped listing to an org-wide issues search so report links resolve after issues are moved.
  • Add a workflow step to migrate existing misaligned [Fleet Monitor] issues from .github-private to their target repositories via GraphQL transferIssue.
  • Update the tracking step to create/update issues in the target repo (using GH_PAT_WORKFLOWS) and ensure required labels per target repo.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
scripts/fleet_monitor.sh Builds an org-wide lookup of open fleet-tracker issues for inline report linking.
.github/workflows/actions-fleet-monitor.yml Migrates existing misaligned issues and updates cross-repo issue creation/updating to target repos using GH_PAT_WORKFLOWS.

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

Comment thread scripts/fleet_monitor.sh Outdated
Comment thread .github/workflows/actions-fleet-monitor.yml Outdated
- fleet_monitor.sh: add is:issue to org-wide search query to exclude
  PRs with the fleet-tracker label from the issue lookup table
- actions-fleet-monitor.yml: wrap per-item tracking loop in try/catch
  so one inaccessible or missing target repo can't block issue tracking
  for all other high-failure workflows

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
coderabbitai[bot]
coderabbitai Bot previously requested changes May 21, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@scripts/fleet_monitor.sh`:
- Around line 183-189: The search block using gh api "search/issues?..." writes
to issues_lookup_file but currently hides all errors with 2>/dev/null || true
and doesn't account for the Search API 1,000-result cap; update the script
around the gh api call (the search/issues invocation that filters
label:fleet-tracker and title "[Fleet Monitor] ") to (1) document the
1,000-result limitation near the invocation and (2) stop silently swallowing
failures — capture the gh api exit status and stderr instead of redirecting to
/dev/null and, on non-zero exit, emit a clear warning to stderr or the log that
the lookup failed (include the command context and suggest checking
auth/rate-limit) so operators know results may be incomplete while still
preserving the normal output to issues_lookup_file.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: d35370ff-32b9-425d-8181-703f01d5c1ff

📥 Commits

Reviewing files that changed from the base of the PR and between 81e7ca1 and 1b060a8.

📒 Files selected for processing (2)
  • .github/workflows/actions-fleet-monitor.yml
  • scripts/fleet_monitor.sh

Comment thread scripts/fleet_monitor.sh Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6d8c6cc147

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/actions-fleet-monitor.yml Outdated
don-petry and others added 2 commits May 20, 2026 20:02
- Replace '--only-binary :all:' with '--only-binary=":all:"' to avoid
  yamllint misinterpreting the bare ':all:' as a YAML mapping value
- Remove extra alignment spaces in env variable keys (colons rule)
- Replace heredoc Python snippet with python3 -c one-liner to prevent
  non-indented heredoc content from breaking YAML block scalar parsing

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- fleet_monitor.sh: replace silent '2>/dev/null || true' on search/issues
  with explicit exit-status check; emit ::warning:: annotation when the
  lookup fails so operators know inline links may be incomplete; add
  comment documenting the Search API 1,000-result cap

- actions-fleet-monitor.yml: expand createLabel error handling from
  'throw on non-422' to explicitly handle 403 (no write access) and
  410 (issues disabled) with targeted core.warning messages instead of
  propagating to the outer catch; unexpected errors still re-throw

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

Copy link
Copy Markdown

@don-petry
don-petry dismissed coderabbitai[bot]’s stale review May 21, 2026 01:08

All actionable comments have been addressed in subsequent commits. CodeRabbit confirmed the fixes in their follow-up comment but is currently rate-limited and cannot re-review.

@don-petry
don-petry merged commit 8ec3f19 into main May 21, 2026
35 of 39 checks passed
@don-petry
don-petry deleted the feat/fleet-monitor-cross-repo-issues branch May 21, 2026 01:20
don-petry added a commit that referenced this pull request Jun 7, 2026
* feat(fleet-monitor): raise issues in the repo they pertain to

- Track high-failure workflows: create/update issues in the target
  repo (owner/repo parsed from item.repo) instead of .github-private.
  Switch token from github.token to GH_PAT_WORKFLOWS for cross-repo
  issues:write. Ensure labels once per target repo via a Set guard.

- Migrate misaligned issues: new step before tracking runs a one-shot
  migration using GraphQL transferIssue to move any open fleet-tracker
  issues currently in .github-private to their correct target repos.
  createLabelsIfMissing copies labels automatically. Soft-fails per
  issue so a single inaccessible repo can't block the whole step.

- Issue lookup (fleet_monitor.sh step 2b): switch from querying only
  GITHUB_REPOSITORY to an org-wide search/issues query so the report's
  inline issue links resolve correctly after migration.

Closes #315

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

* fix(fleet-monitor): address Copilot review comments

- fleet_monitor.sh: add is:issue to org-wide search query to exclude
  PRs with the fleet-tracker label from the issue lookup table
- actions-fleet-monitor.yml: wrap per-item tracking loop in try/catch
  so one inaccessible or missing target repo can't block issue tracking
  for all other high-failure workflows

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

* fix(ci): resolve yamllint errors in issue-triage-runner.yml

- Replace '--only-binary :all:' with '--only-binary=":all:"' to avoid
  yamllint misinterpreting the bare ':all:' as a YAML mapping value
- Remove extra alignment spaces in env variable keys (colons rule)
- Replace heredoc Python snippet with python3 -c one-liner to prevent
  non-indented heredoc content from breaking YAML block scalar parsing

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

* fix(fleet-monitor): address CodeRabbit and ChatGPT Codex review comments

- fleet_monitor.sh: replace silent '2>/dev/null || true' on search/issues
  with explicit exit-status check; emit :⚠️: annotation when the
  lookup fails so operators know inline links may be incomplete; add
  comment documenting the Search API 1,000-result cap

- actions-fleet-monitor.yml: expand createLabel error handling from
  'throw on non-422' to explicitly handle 403 (no write access) and
  410 (issues disabled) with targeted core.warning messages instead of
  propagating to the outer catch; unexpected errors still re-throw

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Jun 7, 2026
* feat(fleet-monitor): raise issues in the repo they pertain to

- Track high-failure workflows: create/update issues in the target
  repo (owner/repo parsed from item.repo) instead of .github-private.
  Switch token from github.token to GH_PAT_WORKFLOWS for cross-repo
  issues:write. Ensure labels once per target repo via a Set guard.

- Migrate misaligned issues: new step before tracking runs a one-shot
  migration using GraphQL transferIssue to move any open fleet-tracker
  issues currently in .github-private to their correct target repos.
  createLabelsIfMissing copies labels automatically. Soft-fails per
  issue so a single inaccessible repo can't block the whole step.

- Issue lookup (fleet_monitor.sh step 2b): switch from querying only
  GITHUB_REPOSITORY to an org-wide search/issues query so the report's
  inline issue links resolve correctly after migration.

Closes #315

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

* fix(fleet-monitor): address Copilot review comments

- fleet_monitor.sh: add is:issue to org-wide search query to exclude
  PRs with the fleet-tracker label from the issue lookup table
- actions-fleet-monitor.yml: wrap per-item tracking loop in try/catch
  so one inaccessible or missing target repo can't block issue tracking
  for all other high-failure workflows

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

* fix(ci): resolve yamllint errors in issue-triage-runner.yml

- Replace '--only-binary :all:' with '--only-binary=":all:"' to avoid
  yamllint misinterpreting the bare ':all:' as a YAML mapping value
- Remove extra alignment spaces in env variable keys (colons rule)
- Replace heredoc Python snippet with python3 -c one-liner to prevent
  non-indented heredoc content from breaking YAML block scalar parsing

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

* fix(fleet-monitor): address CodeRabbit and ChatGPT Codex review comments

- fleet_monitor.sh: replace silent '2>/dev/null || true' on search/issues
  with explicit exit-status check; emit :⚠️: annotation when the
  lookup fails so operators know inline links may be incomplete; add
  comment documenting the Search API 1,000-result cap

- actions-fleet-monitor.yml: expand createLabel error handling from
  'throw on non-422' to explicitly handle 403 (no write access) and
  410 (issues disabled) with targeted core.warning messages instead of
  propagating to the outer catch; unexpected errors still re-throw

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Jun 8, 2026
* feat(fleet-monitor): raise issues in the repo they pertain to

- Track high-failure workflows: create/update issues in the target
  repo (owner/repo parsed from item.repo) instead of .github-private.
  Switch token from github.token to GH_PAT_WORKFLOWS for cross-repo
  issues:write. Ensure labels once per target repo via a Set guard.

- Migrate misaligned issues: new step before tracking runs a one-shot
  migration using GraphQL transferIssue to move any open fleet-tracker
  issues currently in .github-private to their correct target repos.
  createLabelsIfMissing copies labels automatically. Soft-fails per
  issue so a single inaccessible repo can't block the whole step.

- Issue lookup (fleet_monitor.sh step 2b): switch from querying only
  GITHUB_REPOSITORY to an org-wide search/issues query so the report's
  inline issue links resolve correctly after migration.

Closes #315

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

* fix(fleet-monitor): address Copilot review comments

- fleet_monitor.sh: add is:issue to org-wide search query to exclude
  PRs with the fleet-tracker label from the issue lookup table
- actions-fleet-monitor.yml: wrap per-item tracking loop in try/catch
  so one inaccessible or missing target repo can't block issue tracking
  for all other high-failure workflows

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

* fix(ci): resolve yamllint errors in issue-triage-runner.yml

- Replace '--only-binary :all:' with '--only-binary=":all:"' to avoid
  yamllint misinterpreting the bare ':all:' as a YAML mapping value
- Remove extra alignment spaces in env variable keys (colons rule)
- Replace heredoc Python snippet with python3 -c one-liner to prevent
  non-indented heredoc content from breaking YAML block scalar parsing

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

* fix(fleet-monitor): address CodeRabbit and ChatGPT Codex review comments

- fleet_monitor.sh: replace silent '2>/dev/null || true' on search/issues
  with explicit exit-status check; emit :⚠️: annotation when the
  lookup fails so operators know inline links may be incomplete; add
  comment documenting the Search API 1,000-result cap

- actions-fleet-monitor.yml: expand createLabel error handling from
  'throw on non-422' to explicitly handle 403 (no write access) and
  410 (issues disabled) with targeted core.warning messages instead of
  propagating to the outer catch; unexpected errors still re-throw

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Jun 12, 2026
* feat(fleet-monitor): raise issues in the repo they pertain to

- Track high-failure workflows: create/update issues in the target
  repo (owner/repo parsed from item.repo) instead of .github-private.
  Switch token from github.token to GH_PAT_WORKFLOWS for cross-repo
  issues:write. Ensure labels once per target repo via a Set guard.

- Migrate misaligned issues: new step before tracking runs a one-shot
  migration using GraphQL transferIssue to move any open fleet-tracker
  issues currently in .github-private to their correct target repos.
  createLabelsIfMissing copies labels automatically. Soft-fails per
  issue so a single inaccessible repo can't block the whole step.

- Issue lookup (fleet_monitor.sh step 2b): switch from querying only
  GITHUB_REPOSITORY to an org-wide search/issues query so the report's
  inline issue links resolve correctly after migration.

Closes #315

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

* fix(fleet-monitor): address Copilot review comments

- fleet_monitor.sh: add is:issue to org-wide search query to exclude
  PRs with the fleet-tracker label from the issue lookup table
- actions-fleet-monitor.yml: wrap per-item tracking loop in try/catch
  so one inaccessible or missing target repo can't block issue tracking
  for all other high-failure workflows

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

* fix(ci): resolve yamllint errors in issue-triage-runner.yml

- Replace '--only-binary :all:' with '--only-binary=":all:"' to avoid
  yamllint misinterpreting the bare ':all:' as a YAML mapping value
- Remove extra alignment spaces in env variable keys (colons rule)
- Replace heredoc Python snippet with python3 -c one-liner to prevent
  non-indented heredoc content from breaking YAML block scalar parsing

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

* fix(fleet-monitor): address CodeRabbit and ChatGPT Codex review comments

- fleet_monitor.sh: replace silent '2>/dev/null || true' on search/issues
  with explicit exit-status check; emit :⚠️: annotation when the
  lookup fails so operators know inline links may be incomplete; add
  comment documenting the Search API 1,000-result cap

- actions-fleet-monitor.yml: expand createLabel error handling from
  'throw on non-422' to explicitly handle 403 (no write access) and
  410 (issues disabled) with targeted core.warning messages instead of
  propagating to the outer catch; unexpected errors still re-throw

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Jun 14, 2026
* feat(fleet-monitor): raise issues in the repo they pertain to

- Track high-failure workflows: create/update issues in the target
  repo (owner/repo parsed from item.repo) instead of .github-private.
  Switch token from github.token to GH_PAT_WORKFLOWS for cross-repo
  issues:write. Ensure labels once per target repo via a Set guard.

- Migrate misaligned issues: new step before tracking runs a one-shot
  migration using GraphQL transferIssue to move any open fleet-tracker
  issues currently in .github-private to their correct target repos.
  createLabelsIfMissing copies labels automatically. Soft-fails per
  issue so a single inaccessible repo can't block the whole step.

- Issue lookup (fleet_monitor.sh step 2b): switch from querying only
  GITHUB_REPOSITORY to an org-wide search/issues query so the report's
  inline issue links resolve correctly after migration.

Closes #315

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

* fix(fleet-monitor): address Copilot review comments

- fleet_monitor.sh: add is:issue to org-wide search query to exclude
  PRs with the fleet-tracker label from the issue lookup table
- actions-fleet-monitor.yml: wrap per-item tracking loop in try/catch
  so one inaccessible or missing target repo can't block issue tracking
  for all other high-failure workflows

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

* fix(ci): resolve yamllint errors in issue-triage-runner.yml

- Replace '--only-binary :all:' with '--only-binary=":all:"' to avoid
  yamllint misinterpreting the bare ':all:' as a YAML mapping value
- Remove extra alignment spaces in env variable keys (colons rule)
- Replace heredoc Python snippet with python3 -c one-liner to prevent
  non-indented heredoc content from breaking YAML block scalar parsing

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

* fix(fleet-monitor): address CodeRabbit and ChatGPT Codex review comments

- fleet_monitor.sh: replace silent '2>/dev/null || true' on search/issues
  with explicit exit-status check; emit :⚠️: annotation when the
  lookup fails so operators know inline links may be incomplete; add
  comment documenting the Search API 1,000-result cap

- actions-fleet-monitor.yml: expand createLabel error handling from
  'throw on non-422' to explicitly handle 403 (no write access) and
  410 (issues disabled) with targeted core.warning messages instead of
  propagating to the outer catch; unexpected errors still re-throw

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Jun 18, 2026
* feat(fleet-monitor): raise issues in the repo they pertain to

- Track high-failure workflows: create/update issues in the target
  repo (owner/repo parsed from item.repo) instead of .github-private.
  Switch token from github.token to GH_PAT_WORKFLOWS for cross-repo
  issues:write. Ensure labels once per target repo via a Set guard.

- Migrate misaligned issues: new step before tracking runs a one-shot
  migration using GraphQL transferIssue to move any open fleet-tracker
  issues currently in .github-private to their correct target repos.
  createLabelsIfMissing copies labels automatically. Soft-fails per
  issue so a single inaccessible repo can't block the whole step.

- Issue lookup (fleet_monitor.sh step 2b): switch from querying only
  GITHUB_REPOSITORY to an org-wide search/issues query so the report's
  inline issue links resolve correctly after migration.

Closes #315

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

* fix(fleet-monitor): address Copilot review comments

- fleet_monitor.sh: add is:issue to org-wide search query to exclude
  PRs with the fleet-tracker label from the issue lookup table
- actions-fleet-monitor.yml: wrap per-item tracking loop in try/catch
  so one inaccessible or missing target repo can't block issue tracking
  for all other high-failure workflows

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

* fix(ci): resolve yamllint errors in issue-triage-runner.yml

- Replace '--only-binary :all:' with '--only-binary=":all:"' to avoid
  yamllint misinterpreting the bare ':all:' as a YAML mapping value
- Remove extra alignment spaces in env variable keys (colons rule)
- Replace heredoc Python snippet with python3 -c one-liner to prevent
  non-indented heredoc content from breaking YAML block scalar parsing

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

* fix(fleet-monitor): address CodeRabbit and ChatGPT Codex review comments

- fleet_monitor.sh: replace silent '2>/dev/null || true' on search/issues
  with explicit exit-status check; emit :⚠️: annotation when the
  lookup fails so operators know inline links may be incomplete; add
  comment documenting the Search API 1,000-result cap

- actions-fleet-monitor.yml: expand createLabel error handling from
  'throw on non-422' to explicitly handle 403 (no write access) and
  410 (issues disabled) with targeted core.warning messages instead of
  propagating to the outer catch; unexpected errors still re-throw

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Jun 25, 2026
* feat(fleet-monitor): raise issues in the repo they pertain to

- Track high-failure workflows: create/update issues in the target
  repo (owner/repo parsed from item.repo) instead of .github-private.
  Switch token from github.token to GH_PAT_WORKFLOWS for cross-repo
  issues:write. Ensure labels once per target repo via a Set guard.

- Migrate misaligned issues: new step before tracking runs a one-shot
  migration using GraphQL transferIssue to move any open fleet-tracker
  issues currently in .github-private to their correct target repos.
  createLabelsIfMissing copies labels automatically. Soft-fails per
  issue so a single inaccessible repo can't block the whole step.

- Issue lookup (fleet_monitor.sh step 2b): switch from querying only
  GITHUB_REPOSITORY to an org-wide search/issues query so the report's
  inline issue links resolve correctly after migration.

Closes #315

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

* fix(fleet-monitor): address Copilot review comments

- fleet_monitor.sh: add is:issue to org-wide search query to exclude
  PRs with the fleet-tracker label from the issue lookup table
- actions-fleet-monitor.yml: wrap per-item tracking loop in try/catch
  so one inaccessible or missing target repo can't block issue tracking
  for all other high-failure workflows

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

* fix(ci): resolve yamllint errors in issue-triage-runner.yml

- Replace '--only-binary :all:' with '--only-binary=":all:"' to avoid
  yamllint misinterpreting the bare ':all:' as a YAML mapping value
- Remove extra alignment spaces in env variable keys (colons rule)
- Replace heredoc Python snippet with python3 -c one-liner to prevent
  non-indented heredoc content from breaking YAML block scalar parsing

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

* fix(fleet-monitor): address CodeRabbit and ChatGPT Codex review comments

- fleet_monitor.sh: replace silent '2>/dev/null || true' on search/issues
  with explicit exit-status check; emit :⚠️: annotation when the
  lookup fails so operators know inline links may be incomplete; add
  comment documenting the Search API 1,000-result cap

- actions-fleet-monitor.yml: expand createLabel error handling from
  'throw on non-422' to explicitly handle 403 (no write access) and
  410 (issues disabled) with targeted core.warning messages instead of
  propagating to the outer catch; unexpected errors still re-throw

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Jun 25, 2026
* feat(fleet-monitor): raise issues in the repo they pertain to

- Track high-failure workflows: create/update issues in the target
  repo (owner/repo parsed from item.repo) instead of .github-private.
  Switch token from github.token to GH_PAT_WORKFLOWS for cross-repo
  issues:write. Ensure labels once per target repo via a Set guard.

- Migrate misaligned issues: new step before tracking runs a one-shot
  migration using GraphQL transferIssue to move any open fleet-tracker
  issues currently in .github-private to their correct target repos.
  createLabelsIfMissing copies labels automatically. Soft-fails per
  issue so a single inaccessible repo can't block the whole step.

- Issue lookup (fleet_monitor.sh step 2b): switch from querying only
  GITHUB_REPOSITORY to an org-wide search/issues query so the report's
  inline issue links resolve correctly after migration.

Closes #315

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

* fix(fleet-monitor): address Copilot review comments

- fleet_monitor.sh: add is:issue to org-wide search query to exclude
  PRs with the fleet-tracker label from the issue lookup table
- actions-fleet-monitor.yml: wrap per-item tracking loop in try/catch
  so one inaccessible or missing target repo can't block issue tracking
  for all other high-failure workflows

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

* fix(ci): resolve yamllint errors in issue-triage-runner.yml

- Replace '--only-binary :all:' with '--only-binary=":all:"' to avoid
  yamllint misinterpreting the bare ':all:' as a YAML mapping value
- Remove extra alignment spaces in env variable keys (colons rule)
- Replace heredoc Python snippet with python3 -c one-liner to prevent
  non-indented heredoc content from breaking YAML block scalar parsing

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

* fix(fleet-monitor): address CodeRabbit and ChatGPT Codex review comments

- fleet_monitor.sh: replace silent '2>/dev/null || true' on search/issues
  with explicit exit-status check; emit :⚠️: annotation when the
  lookup fails so operators know inline links may be incomplete; add
  comment documenting the Search API 1,000-result cap

- actions-fleet-monitor.yml: expand createLabel error handling from
  'throw on non-422' to explicitly handle 403 (no write access) and
  410 (issues disabled) with targeted core.warning messages instead of
  propagating to the outer catch; unexpected errors still re-throw

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

[Fleet Monitor] petry-projects/broodly — terraform.yml

2 participants