Skip to content

chore(repo): promote dev to main - #2505

Merged
ankit-yc merged 2 commits into
mainfrom
dev
Aug 25, 2026
Merged

chore(repo): promote dev to main#2505
ankit-yc merged 2 commits into
mainfrom
dev

Conversation

@ankit-yc

Copy link
Copy Markdown
Contributor

PR Checklist

  • The PR title follows our guidelines.
  • There is an issue for the bug/feature this PR is for.
  • All existing tests and lints pass.

What is the current behavior?

main is 2 commits behind dev, and both are workflow fixes that only take effect once they are ON main.

c11cf1645  Merge pull request #2503 from YosemiteCrew/main   (the back-merge)
c5549018a  ci(repo): let the back-merge report why it cannot open its own pull request (#2504)

#2504 added two things:

  1. back-merge.yml now prefers a BACKMERGE_TOKEN when present and, when refused, explains that GITHUB_TOKEN cannot open pull requests here rather than dying on a raw GraphQL error.
  2. pr-governance.yml exempts the back-merge direction (base: dev, head: main) from re-linting commit messages, matching the exemption that already existed for dev to main promotions.

The second one does not work until main carries it. For pull_request events GitHub reads the workflow definition from the HEAD branch, and a back-merge's head IS main. Verified empirically: a fresh run after #2504 merged (32855397093) still executed the job and failed on chore(deps): bump json (#2131), so #2503 had to be merged with an explicit admin bypass.

This promotion is what makes the exemption real, so the next back-merge does not need that bypass.

What is the new behavior?

Nothing at runtime. The whole diff is:

.github/workflows/back-merge.yml
.github/workflows/pr-governance.yml
  • 0 files under apps/ or packages/
  • 0 migrations

Deploy notes

No API deploy is needed. Production is already running 1adfd8064, and this carries no backend code and no migrations, so the running API is unaffected.

cd-frontend.yaml fires on push to main, but its detect-frontend job gates the deploy on affected paths and nothing frontend changed here, so it should self-skip. Worth a glance at the run afterwards rather than an assumption.

Related Issue(s)

Refs #2393

ankit-yc and others added 2 commits August 25, 2026 15:44
…equest (#2504)

* ci(repo): let the back-merge report why it cannot open its own pull request

The first real run of back-merge.yml failed on the #2483 promotion with:

  pull request create failed: GraphQL: GitHub Actions is not permitted to
  create or approve pull requests (createPullRequest)

My mistake. The job carries pull-requests: write, but that is overridden by
'Allow GitHub Actions to create and approve pull requests', which is off at both
repository and organisation level. I verified the workflow's LOGIC against the
real repository state and never verified the one thing it exists to do, which is
that its token can actually open a pull request.

That setting should stay off. It also lets a workflow APPROVE pull requests, so
turning it on to fix a back-merge would open a larger hole than the one this job
closes.

So take a token if one is offered and explain the situation when it is not:

- prefer BACKMERGE_TOKEN when the secret exists, falling back to GITHUB_TOKEN,
  and print which one is in use so a silent fallback is visible
- on the specific refusal, print what is wrong, why the obvious setting change is
  the wrong answer, and the exact command to open it by hand
- on any OTHER failure, report the real error rather than blaming the setting

Exercised all four paths against a stubbed gh: refusal exits 1 with the guidance,
an unrelated failure exits 1 with its own message and does not mention settings,
success with a PAT exits 0, and the already-holds no-op is what the live run did.

#2503 carries the back-merge this run should have opened.

Refs #2393

* ci(repo): do not re-lint main's history on a back-merge pull request

#2503, the back-merge this workflow should have opened, failed 'Validate commit
messages' on:

  chore(deps): bump json (#2131)
  scope must be one of [backend, frontend, ...] [scope-enum]

Scope 'deps' is not in the enum. That is the Dependabot commit merged straight
into main on 2026-08-13 - the incident that made back-merges necessary in the
first place - so the back-merge fails on the very commit it exists to carry back.

The job already exempts the promotion direction for this exact reason: a dev to
main pull request replays already-merged history and re-lints commits that
shipped long ago and cannot be rewritten. A back-merge is the same thing in the
opposite direction and was simply not covered.

Exempt base dev + head main symmetrically. Verified the condition still
distinguishes all four directions: promotion skips, back-merge skips, an ordinary
branch into dev or main still lints, and the dependabot exemption is unchanged.

Refs #2393

---------

Co-authored-by: Ankit Upadhyay <ankit@dunexploration.com>
chore(repo): back-merge main into dev
@ankit-yc
ankit-yc requested a review from aupyay as a code owner August 25, 2026 14:03
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@sonarqubecloud

Copy link
Copy Markdown

@sonarqubecloud

Copy link
Copy Markdown

@sonarqubecloud

Copy link
Copy Markdown

@sonarqubecloud

Copy link
Copy Markdown

@ankit-yc
ankit-yc merged commit 7f92970 into main Aug 25, 2026
86 checks passed
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.

1 participant