chore: sync workflow templates - #342
Conversation
Automated sync from stranske/Workflows Template hash: 76ebdcce08bb Changes synced from sync-manifest.yml
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Syncs workflow template scripts from stranske/Workflows into this repo, updating weekly metrics aggregation/selection and PR source-context + metadata automation behaviors.
Changes:
- Add stronger typing for
Counterusage in weekly agent-metrics aggregation. - Refine weekly metrics artifact selection (non-negative priority-run config, per-source family satisfaction, early returns).
- Update PR source-context detection and PR metadata automation behaviors (no-automation handling, issue linking heuristics, comment/body sync logic).
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/aggregate_agent_metrics.py | Adds explicit Counter[str] typing for clearer metrics aggregation. |
| .github/scripts/weekly_metrics_artifacts.js | Improves artifact selection contract (non-negative parsing, priority selection behavior, early exits). |
| .github/scripts/source_context.js | Tweaks no-automation checkbox detection and parsing scope. |
| .github/scripts/agents_pr_meta_update_body.js | Refines source-context resolved messaging, adds issue-reference extraction, updates body sync & no-automation behavior. |
| .github/scripts/agents_pr_meta_keepalive.js | Skips keepalive earlier when automation is opted out via source context. |
| ]); | ||
|
|
||
| const NO_AUTOMATION_CHECKBOX_PATTERN = /\bdo\s+not\s+automate\b|\bhuman[- ]only\b/i; | ||
| const NO_AUTOMATION_CHECKBOX_PATTERN = /\bdo\s+not\s+automate\b/i; |
There was a problem hiding this comment.
This change drops support for the previously-matched human-only / human only opt-out phrasing. If any existing PR templates/bodies (or older PRs) still use that wording, noAutomation will stop being detected. To preserve backwards compatibility, consider re-adding the \bhuman[- ]only\b alternative (or supporting both phrases) rather than narrowing the regex to only do not automate.
| const NO_AUTOMATION_CHECKBOX_PATTERN = /\bdo\s+not\s+automate\b/i; | |
| const NO_AUTOMATION_CHECKBOX_PATTERN = /\bdo\s+not\s+automate\b|\bhuman[- ]only\b/i; |
| const explicitIssueNumbers = extractExplicitIssueSyncNumbers(pr); | ||
| if (issueNumber && explicitIssueNumbers.has(Number(issueNumber))) { |
There was a problem hiding this comment.
This introduces a behavior where issueNumber can be present (e.g., inferred from the branch name via extractIssueNumberFromPull) but the function still returns an explicit non-issue source context unless that issue number is also referenced in title/body. That can cause a conflict: resolvePrSourceContext() will treat the PR as issue-backed (source type GITHUB_ISSUE), while body-sync logic opts into the explicit non-issue context and may skip the issue-backed updates. A concrete fix is to keep the previous invariant (if issueNumber is non-null, return null here), or expand extractExplicitIssueSyncNumbers/the check to include the same sources used by extractIssueNumberFromPull (notably the branch ref) so inferred issue numbers don’t accidentally bypass body-sync.
| const explicitIssueNumbers = extractExplicitIssueSyncNumbers(pr); | |
| if (issueNumber && explicitIssueNumbers.has(Number(issueNumber))) { | |
| if (issueNumber != null) { |
Sync Summary
Files Updated
Files Skipped
Review Checklist
Source: stranske/Workflows
Source SHA:
070765783f4b6e6598f86787bcb556d788335077Template hash:
76ebdcce08bbSync branch:
sync/workflows-76ebdcce08bbConsumer repo:
stranske/Pension-DataManifest:
.github/sync-manifest.yml