Skip to content

Automate issue and PR metadata completion end to end #1011

@ashleyshaw

Description

@ashleyshaw

Automation Summary

Improve the issue and PR metadata automation so GitHub items receive the expected project fields, assignee, milestone, and relationship data even when canonical labels arrive after the item is created.

At the moment, the workflow set is label-first and event-sensitive. That means Type, Status, Priority, and related project fields can remain empty until a later label event, and some items never get a full metadata pass. The goal is to make the metadata workflows resilient enough that issue and PR records are populated consistently from the first useful event, then kept in sync as labels change.

Steps / Checklist

  • Review the current event triggers for metadata-governance.yml and project-meta-sync.yml.
  • Add or correct workflow triggers so metadata sync reruns when labels change.
  • Add fallback derivation for project fields when labels are temporarily unavailable.
  • Keep assignee, milestone, and relationship metadata aligned with the same item lifecycle.
  • Update workflow/docs/tests in a single PR.
  • Preserve template enforcement and changelog discipline.

Acceptance Criteria

  • Issues and PRs receive project field values without waiting on manual intervention.
  • Late-applied labels still cause project metadata to refresh.
  • Assignee, milestone, and relationship metadata continue to work for both issues and PRs.
  • Tests cover the revised metadata derivation and trigger behaviour.
  • Documentation reflects the final workflow contract.

Additional Context

Related live work:

  • PR ci(workflows): add merge_group trigger to unblock GitHub Merge Queue #1008: merge-queue trigger fix, already reviewed as a good baseline for the broader automation set.
  • Current workflows: .github/workflows/metadata-governance.yml and .github/workflows/project-meta-sync.yml.
  • Current helpers: scripts/agents/includes/issue-pr-metadata.cjs and scripts/agents/includes/derive-project-fields.cjs.

Likely gap to address:

  • project-meta-sync.yml should not rely on a single early label snapshot if the item can gain labels shortly after creation.

Definition of Ready (DoR)

  • Scope is limited to metadata automation, docs, and tests.
  • Behavioural target is clear for issues and PRs.
  • Update can land in one PR.

Definition of Done (DoD)

  • Metadata values are assigned consistently for issues and PRs.
  • Workflow triggers and derivation logic are aligned.
  • Tests pass and coverage is maintained.
  • Documentation is updated.
  • No regressions in template enforcement or changelog checks.

Metadata

Metadata

Assignees

Type

No type

Priority

None yet

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions