-
Notifications
You must be signed in to change notification settings - Fork 372
Fix lint-go failure and enrich CGO failure issues with direct job links and expiration markers #28615
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix lint-go failure and enrich CGO failure issues with direct job links and expiration markers #28615
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -1750,9 +1750,34 @@ jobs: | |||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| // Fetch all jobs for this run to get direct job links | ||||||||||||||||||||||||||||||||||||||
| const jobsResponse = await github.rest.actions.listJobsForWorkflowRun({ | ||||||||||||||||||||||||||||||||||||||
| owner: context.repo.owner, | ||||||||||||||||||||||||||||||||||||||
| repo: context.repo.repo, | ||||||||||||||||||||||||||||||||||||||
| run_id: context.runId, | ||||||||||||||||||||||||||||||||||||||
| per_page: 100, | ||||||||||||||||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| // Build a map from job name to job URL for failed jobs | ||||||||||||||||||||||||||||||||||||||
| const jobUrlMap = {}; | ||||||||||||||||||||||||||||||||||||||
| for (const job of jobsResponse.data.jobs) { | ||||||||||||||||||||||||||||||||||||||
| if (failedJobs.includes(job.name)) { | ||||||||||||||||||||||||||||||||||||||
| jobUrlMap[job.name] = job.html_url; | ||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+1753
to
+1767
|
||||||||||||||||||||||||||||||||||||||
| // Fetch all jobs for this run to get direct job links | |
| const jobsResponse = await github.rest.actions.listJobsForWorkflowRun({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| run_id: context.runId, | |
| per_page: 100, | |
| }); | |
| // Build a map from job name to job URL for failed jobs | |
| const jobUrlMap = {}; | |
| for (const job of jobsResponse.data.jobs) { | |
| if (failedJobs.includes(job.name)) { | |
| jobUrlMap[job.name] = job.html_url; | |
| } | |
| } | |
| // The notify job may not have `actions: read`, so avoid the Actions API here. | |
| // Failed jobs will be listed by name, and the workflow run link below remains available. | |
| const jobUrlMap = {}; |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -482,7 +482,17 @@ on: | |||||
|
|
||||||
| # Option 2: object | ||||||
| deployment_status: | ||||||
| {} | ||||||
| # Filter to specific deployment states (compiled into if condition). Use a string | ||||||
| # for one state or an array for multiple states. | ||||||
| # (optional) | ||||||
| # This field supports multiple formats (oneOf): | ||||||
|
|
||||||
| # Option 1: string | ||||||
| state: "error" | ||||||
|
|
||||||
| # Option 2: array | ||||||
| state: [] | ||||||
| # Array items: string | ||||||
|
Comment on lines
484
to
+495
|
||||||
|
|
||||||
| # Fork event trigger that runs when someone forks the repository | ||||||
| # (optional) | ||||||
|
|
@@ -3595,7 +3605,7 @@ safe-outputs: | |||||
| github-token-for-extra-empty-commit: "example-value" | ||||||
|
|
||||||
| # Controls protected-file protection. String form: blocked (default), allowed, or | ||||||
| # fallback-to-issue. Object form: { policy, exclude } to customize the | ||||||
| # fallback-to-issue. Object form: { policy, exclude } to customise the | ||||||
|
||||||
| # fallback-to-issue. Object form: { policy, exclude } to customise the | |
| # fallback-to-issue. Object form: { policy, exclude } to customize the |
Copilot
AI
Apr 26, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line uses UK spelling (“Behaviour”) while the same document (and most other docs) use “Behavior”. For consistency, update the source schema/generator text to use a single spelling variant across the docs.
| # Behaviour when no files match: 'error' (default) or 'ignore' | |
| # Behavior when no files match: 'error' (default) or 'ignore' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The workflow currently assumes
listJobsForWorkflowRunwill always succeed. If that REST call fails (permissions, transient GitHub API failure, pagination edge cases), the script will throw and no failure issue gets created. Wrap the job-list fetch/build in a try/catch and fall back to rendering plain job names (or the run URL) when job URLs can't be resolved.