DOCS-1627 - Add GitHub Action to enforce weekend merge window#6798
Conversation
Blocks merges to main from Friday 2pm to Sunday 8pm PT. Includes a scheduled re-check every 30 min and an emergency-merge label override. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…rkflow Eliminates the duplicate check by dropping the createCommitStatus API call and relying solely on the job check created by the workflow runner. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ay list Policy update per Mark: no merges after 14:00 PT Mon-Fri, no after-hours, no weekends, no Sumo holidays. Window opens when India team starts (8am IST). Override label renamed from emergency-merge to active-incident. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Fails loudly if current year exceeds HOLIDAYS_VALID_THROUGH_YEAR so merges cannot silently slip through on an outdated holiday list. See DOCS-1703 for the 2027 update task. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… warn for articles Site changes (workflows, config, src, etc.): hard block outside business hours. Article-only changes (docs/, blog-*, static/img/): soft warning, not blocked. Matches Mark's policy: 2a (site) vs 2b (articles). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
India not staffed for outage response; site change window is US-only. Article-only PRs still warn if outside India AND US hours. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… notes Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Reviewed the implementation against the Docs Site Change Policy. Overall this aligns well — notes below. What was checked
Two small items to address1. 2. Re: point 1 (7:00 am PT start time): The policy previously only stated a 2:00 pm cutoff. The Confluence page has been updated to reflect the full merge window: 7:00 am–2:00 pm Pacific, Monday–Friday Additional notesBackend site change file paths — @vfalconi for sign-off Testing before going live
This way the Action's behavior is verified in production conditions before it can actually block anyone. — via Claude Code |
|
Thanks for the thorough review, @mafsumo! Fix 1 — Fix 2 — Backend file path classification — @vfalconi — via Claude Code |
HOLIDAYS_VALID_THROUGH_YEAR = 2026 causes the expiry check to fire for any date in 2027, making the 2027-01-01 entries in both PT_HOLIDAYS and IST_HOLIDAYS unreachable dead code. Removing them keeps the sets consistent with the constant. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Hi y'all. I don't see any issues with the patterns in the backend change block. My read from that section of the check is that One thing did jump out at me:
If I recall correctly, a PR that changes only an image will result in a failed workflow because changing the image file does not change the build output. If the build output is the same, the workflow fails because there's "nothing to commit" according to Git. I could be wrong, but if y'all haven't tested an image-only change with this, it might be worth confirming. Side note, please make sure to use |
Hi @vfalconisumo, thank you for the feedback, and apologies for the previous tagging error! I’m glad the pattern logic is correct. For your concern about image-only PRs potentially hitting a "nothing to commit" failure - I've opened a test, image-only PR (#6805). Once the |
|
@vfalconisumo @mafsumo Good news! The image-only PR #6805 merged and the updated screenshots are live on the site, which addresses the concern about image-only PRs causing a "nothing to commit" build failure. Static images are included in Docusaurus's build output, so they do produce a changed build when updated. So once you've approved this PR, I'll merge this and then run tests to confirm it works. |
vfalconisumo
left a comment
There was a problem hiding this comment.
@kimsauce That's great!
Purpose of this pull request
This pull request adds a GitHub Actions workflow that enforces Sumo Logic's merge window policy for the
mainbranch, with two enforcement tiers matching Mark's policy (section 2a/2b).Merge window policy:
Backend site changes (workflows, config,
src/,sidebars.ts,package.json,yarn.lock, etc.):active-incidentlabel and re-run the checkDocs and release notes (
docs/,blog-*,static/img/):Mixed PRs (backend + docs files): backend site change rules apply.
How it works:
merge windowcheck inpr.ymlruns on every PR pushOverride (
active-incidentlabel):For active service incidents or outages only. Apply the label to the PR and re-run the
merge windowcheck from the PR checks UI.Impact on existing open PRs:
Once the branch protection rule is updated, all open PRs targeting
mainwill be blocked until themerge windowcheck has run and passed. For PRs with no new commits, the check will show as "Expected" (never run) and GitHub will block the merge. To unblock, push any new commit to the branch.One-time setup required after merging:
active-incidentlabel in the repo (Settings > Labels) — for active service incidents/outages onlymerge windowas a required status check in the branch protection rule formainSelect the type of change
Ticket (if applicable)
https://sumologic.atlassian.net/browse/DOCS-1627