Skip to content

Align issue and PR auto-close automation across Azure Monitor repositories - #2786

Merged
Hector Hernandez (hectorhdzg) merged 8 commits into
mainfrom
hectorh/align-issue-automation
Oct 22, 2026
Merged

Hector Hernandez (hectorhdzg) merged 8 commits into
mainfrom
hectorh/align-issue-automation

Conversation

@hectorhdzg

@hectorhdzg Hector Hernandez (hectorhdzg) commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Aligns issue and PR auto-close automation across the Azure Monitor repositories so they all follow the same rules. The same three workflow files are used in each repo.

Rules

Workflow Trigger Behavior
needs-author-feedback needs-author-feedback label added / author comments Pings the author when the label is added. When the author replies, removes the label, and reopens the issue if it was auto-closed for missing feedback
needs-author-feedback-followup daily Reminder at 7 days, closes at 14 days without an author reply (issues only; keep opts out)
stale daily Issues: no activity for 90 days → stale, closed 14 days later. PRs: 30 days → stale, closed 14 days later. Oldest first and throttled so existing backlogs are worked down gradually

stale intentionally uses a single actions/stale invocation: the action persists its progress under one fixed cache key, so multiple invocations would overwrite each other's progress.

Exempt from inactivity closure: keep, needs-team-attention, waiting labels (waiting, waiting-external, waiting for backend fix, waiting - CDN deployment, fixed - waiting release), and milestoned items. Issues are also exempt when labeled bug or needs-author-feedback (the latter is handled by the follow-up workflow). Any comment or update resets the clock.

Feedback flow safeguards: the follow-up re-checks state, label round and author replies right before closing, removes the label only after a successful close (failures retry next run), and reopens if a reply races the close. The reply handler ignores replies older than the latest label, skips bot-authored issues, and never reverses a maintainer's manual close.

Follow-up (not in this PR)

Rename information requested to needs-author-feedback so existing items are picked up.

Repo-specific

  • Removes stale-assigned.yml and the separate mark-abandoned / stale-wontfix jobs; all items are covered by the single stale job.
  • enhancement / documentation / assigned items are no longer exempt, so long-inactive issues will be warned and closed gradually.

Copilot AI balanced review requested due to automatic review settings October 21, 2026 22:33

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.

🟡 Changes recommended

Unresolved opt-out, PR feedback handling, and shared checkpoint issues undermine the intended automation policy.

3 open issues
What changed in this PR

Aligns repository issue and PR lifecycle automation with the shared Application Insights and OpenTelemetry distro policy.

Changes:

  • Adds author-feedback notifications, label removal on replies, and scheduled reminders and closure.
  • Changes general inactivity handling to 90 days plus a 14-day warning, with throttled, oldest-first processing.
  • Consolidates assigned-item handling into the main stale workflow and sequences the abandonment and stale policies.
File Description
.github/​workflows/​stale.yml Updates inactivity thresholds, exemptions, throttling, and job ordering.
.github/​workflows/​stale-assigned.yml Removes the separate workflow for assigned items.
.github/​workflows/​needs-author-feedback.yml Notifies issue authors and removes the feedback label on replies.
.github/​workflows/​needs-author-feedback-followup.yml Adds daily feedback reminders and automatic closure.

Review effort: Balanced

Comment thread .github/workflows/stale.yml Resolved
Comment thread .github/workflows/stale.yml Resolved
…ories

- needs-author-feedback.yml / needs-author-feedback-followup.yml: notify the author
  when the label is added, remind at 7 days, close at 14 days, and drop the label
  when the author replies
- stale.yml: 90 days stale + 14 days close for general inactivity (oldest first,
  throttled); PRs inactive 30 days marked abandoned; wontfix/abandoned closed
  after 14+14 days; jobs run sequentially

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@hectorhdzg Hector Hernandez (hectorhdzg) changed the title Align issue/PR auto-close automation with OpenTelemetry distros Align issue and PR auto-close automation across Azure Monitor repositories Oct 21, 2026
- stale.yml: use a single actions/stale invocation. The action persists progress
  under one fixed cache key, so multiple throttled jobs overwrote each other's
  checkpoints. Issues: 90 days stale + 14 close. PRs: 30 days stale + 14 close.
  This replaces the separate abandoned/wontfix jobs, applies one consistent PR
  exemption list, and lets PRs labeled needs-author-feedback close normally.
- needs-author-feedback-followup.yml: skip issues labeled keep, and remove the
  label before closing so an author reply racing the run (label already gone)
  leaves the issue open.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
- Re-check issue state, labels and author replies right before auto-closing
- Remove needs-author-feedback only after a successful close so failures retry
- Ignore applied markers from an earlier feedback round
- Reopen auto-closed issues when the author replies
- Exempt waiting labels for PRs too

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
- Skip auto-close if the label was reapplied during the run
- Reopen if the author replied while the issue was being closed
- Reply handler uses current issue state, ignores replies older than the latest label, and only reopens bot closures from the current round

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
- Read state_reason from the fetched issue (closed events do not expose it)
- Count author replies from the latest label application so answers before a backfilled marker are honored

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@hectorhdzg
Hector Hernandez (hectorhdzg) merged commit 752489f into main Oct 22, 2026
10 checks passed
@hectorhdzg
Hector Hernandez (hectorhdzg) deleted the hectorh/align-issue-automation branch October 22, 2026 20:28
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.

4 participants