Repository navigation
feat(ci): move reviewer absence list to ABSENCE_LIST repository variable - #1703
Open
VLukiantsev wants to merge 2 commits into
Open
VLukiantsev wants to merge 2 commits into
VLukiantsev wants to merge 2 commits into
Conversation
## Summary
Moves the PR reviewer and nightly failure alert absence configuration from `ABSENCE.md` in the repository root to the `ABSENCE_LIST` GitHub Actions repository variable (`vars.ABSENCE_LIST`), eliminating the need to open and merge pull requests when updating reviewer out-of-office schedules.
## Key Changes
- **Absence Schedule & Reviewer Assignment**: Update `.github/scripts/absence-schedule.js`, `.github/scripts/assign-reviewers.js`, and `.github/scripts/nightly-failure-alert.js` to resolve `ABSENCE_LIST` from `process.env.ABSENCE_LIST` (or the GitHub Actions Repository Variables API `GET /repos/{owner}/{repo}/actions/variables/ABSENCE_LIST`) and support multiline or comma/semicolon-separated entries while stripping `#` comments first.
- **Retire `ABSENCE.md`**: Remove `ABSENCE.md` from the repository root and relocate `isAuthorCodeOwner` into `.github/scripts/assign-reviewers.js`.
- **Documentation & Tests**: Update `.github/scripts/README.md`, `.agents/rules/github_authoring_and_prs.md`, and unit tests across `.github/scripts/*.test.js`.
## Assumptions
- **GitHub Actions Workflow `env` Injection**: Because the GitHub Personal Access Token configured for the Grain git proxy lacks the `workflow` OAuth scope, `.github/workflows/*.yml` files cannot be modified in this push. `resolveAbsenceContent` attempts `GET /repos/{owner}/{repo}/actions/variables/ABSENCE_LIST` when `process.env.ABSENCE_LIST` is unset, and a follow-up manual step (or granting `workflow` scope on the PAT) adds `ABSENCE_LIST: ${{ vars.ABSENCE_LIST }}` to `.github/workflows/auto-assign-reviewers.yml` and `.github/workflows/nightly-examples-e2e.yml` — if neither `env: ABSENCE_LIST` nor API read access is present, `resolveAbsenceContent` safely returns an empty string without failing the workflow.
TAG=agy
CONV=6db67ffc-2440-47c4-95c3-b83105afe003
Requested-by: vluk@google.com
Approved-by: vluk@google.com
There was a problem hiding this comment.
Code Review
This pull request transitions the reviewer absence tracking from a local ABSENCE.md file to a dynamically resolved ABSENCE_LIST environment variable or GitHub repository variable. It updates the parsing logic to support comma and semicolon delimiters, adapts the reviewer assignment and nightly failure alert scripts to use this new resolution helper, and updates the corresponding test suites. Feedback suggests expanding the test coverage for resolveAbsenceContent to explicitly verify the github.request fallback path.
Adds unit test coverage in `.github/scripts/absence-schedule.test.js` for the `github.request('GET /repos/{owner}/{repo}/actions/variables/{name}')` fallback path in `resolveAbsenceContent`.
Comment link: #1703 (comment)
TAG=agy
CONV=6db67ffc-2440-47c4-95c3-b83105afe003
Requested-by: vluk@google.com
Approved-by: vluk@google.com
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat(ci): move reviewer absence list to ABSENCE_LIST repository variable
Summary
Moves the PR reviewer and nightly failure alert absence configuration from
ABSENCE.mdin the repository root to theABSENCE_LISTGitHub Actions repository variable (vars.ABSENCE_LIST), eliminating the need to open and merge pull requests when updating reviewer out-of-office schedules.Key Changes
.github/scripts/absence-schedule.js,.github/scripts/assign-reviewers.js, and.github/scripts/nightly-failure-alert.jsto resolveABSENCE_LISTfromprocess.env.ABSENCE_LIST(or the GitHub Actions Repository Variables APIGET /repos/{owner}/{repo}/actions/variables/ABSENCE_LIST) and support multiline or comma/semicolon-separated entries while stripping#comments first.ABSENCE.md: RemoveABSENCE.mdfrom the repository root and relocateisAuthorCodeOwnerinto.github/scripts/assign-reviewers.js..github/scripts/README.md,.agents/rules/github_authoring_and_prs.md, and unit tests across.github/scripts/*.test.js.Assumptions
envInjection: Because the GitHub Personal Access Token configured for the Grain git proxy lacks theworkflowOAuth scope,.github/workflows/*.ymlfiles cannot be modified in this push.resolveAbsenceContentattemptsGET /repos/{owner}/{repo}/actions/variables/ABSENCE_LISTwhenprocess.env.ABSENCE_LISTis unset, and a follow-up manual step (or grantingworkflowscope on the PAT) addsABSENCE_LIST: ${{ vars.ABSENCE_LIST }}to.github/workflows/auto-assign-reviewers.ymland.github/workflows/nightly-examples-e2e.yml— if neitherenv: ABSENCE_LISTnor API read access is present,resolveAbsenceContentsafely returns an empty string without failing the workflow.TAG=agy
CONV=6db67ffc-2440-47c4-95c3-b83105afe003
Requested-by: vluk@google.com
Approved-by: vluk@google.com
Also on this branch:
Automated change for grain task 77.