Skip to content

feat(ci): move reviewer absence list to ABSENCE_LIST repository variable - #1703

Open
VLukiantsev wants to merge 2 commits into
mainfrom
grain/65c50381/task-77-move-absence-content-to-the
Open

VLukiantsev wants to merge 2 commits into
mainfrom
grain/65c50381/task-77-move-absence-content-to-the

Conversation

@VLukiantsev

@VLukiantsev VLukiantsev commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

feat(ci): move reviewer absence list to ABSENCE_LIST repository variable

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

Also on this branch:

  • test(ci): cover github.request fallback path in resolveAbsenceContent

Automated change for grain task 77.

## 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
@github-actions
github-actions Bot requested a review from janzak-dev November 16, 2026 15:32

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

No deployments
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