Skip to content

feat(repos): the drift Job reads merge settings and bypass actors - #7201

Merged
dan-petty merged 6 commits into
mainfrom
feat/6888-drift-token-write-scopes
Nov 25, 2026
Merged

dan-petty merged 6 commits into
mainfrom
feat/6888-drift-token-write-scopes

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

The token of the nightly drift check (CronJob repos-drift) asks for CONST_GITHUB_APP_DRIFT_TOKEN_PERMISSIONS: the read set, plus Contents write and Administration write. GitHub gives the merge settings of a repository only to Contents write, and bypass_actors of a ruleset and the Code Quality setup only to Administration write. So rows 2 and 10 now compare these fields each night, and the Job also runs row 4.

The setting service.github_app.read_only is now service.github_app.drift_check, with the variable DEVOPS_CLI_SERVICE_GITHUB_APP_DRIFT_CHECK. The ConfigMap does not carry it. CONST_GITHUB_APP_READ_TOKEN_PERMISSIONS stays for the reader App of the tf stacks. A plan still sends only GET requests: RouteWriter sends no write without --confirm, and a test proves it with the write-capable token.

The docs, the specs, the CronJob, the alert text and the Status History of ADR 0015 name the new set.

Closes #6888

Change: openspec/changes/archive/2026-11-23-6888-drift-token-write-scopes/

…on write

The set, the setting and its variable of the drift Job get the name of
what they are: CONST_GITHUB_APP_DRIFT_TOKEN_PERMISSIONS,
service.github_app.drift_check and DEVOPS_CLI_SERVICE_GITHUB_APP_DRIFT_CHECK
(#6888).
The token of the drift check holds Administration write, so the Job
also reads the Code Quality setup of row 4 (#6888).
The drift Job asks for Contents write and Administration write, and a
plan still sends GET requests only (#6888).
@dan-petty dan-petty added type/feature Type feature: a new function scope/repos The devops repos commands and worktrees labels Nov 25, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Rollout note (not part of the squash message): settings ignore an unknown prefixed variable, so the rename cannot stop the Job. If the runner image and the CronJob roll at different times, one night's run asks for the default App permission set; a plan still sends only GET requests. After the deploy, the next run reads rows 2, 4 and 10 of each repository, so RepositorySettingsUnreadable stops firing for them and RepositorySettingsDrift shows the real differences (see the plan on #6784).

@dan-petty
dan-petty marked this pull request as ready for review November 25, 2026 17:13
@dan-petty
dan-petty merged commit 4c14220 into main Nov 25, 2026
29 checks passed
@dan-petty
dan-petty deleted the feat/6888-drift-token-write-scopes branch November 25, 2026 17:15
dan-petty-release Bot added a commit that referenced this pull request Nov 25, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.221.0](v0.220.0...v0.221.0)
(2026-11-25)


### Features

* **repos:** the drift Job reads merge settings and bypass actors
([#7201](#7201))
([4c14220](4c14220))


### Bug Fixes

* **roadmap:** post the refine event comment on changed deferrals
([#6378](#6378))
([#7200](#7200))
([c869ffc](c869ffc))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/repos The devops repos commands and worktrees type/feature Type feature: a new function

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(repos): the drift Job reads merge settings and bypass actors

1 participant