Skip to content

Conversation

@MarshallOfSound
Copy link
Member

Add automation to create PRs for updating the CHROMIUM_SRC_SHA in electron/build-images when the monitored Chromium files (build/install-build-deps.sh, build/install-build-deps.py) change between the current pinned SHA and Chromium HEAD.

This runs both as a cron job and automatically when Chromium PRs are merged in electron/electron, but only creates PRs when there's an actual difference in the monitored files.

Add automation to create PRs for updating the CHROMIUM_SRC_SHA in
electron/build-images when the monitored Chromium files
(build/install-build-deps.sh, build/install-build-deps.py) change
between the current pinned SHA and Chromium HEAD.

This runs both as a cron job and automatically when Chromium PRs
are merged in electron/electron, but only creates PRs when there's
an actual difference in the monitored files.
@MarshallOfSound MarshallOfSound requested review from a team as code owners December 16, 2025 22:00
Add comprehensive tests for the didChromiumFilesChange function:
- Returns false when no files changed between SHAs
- Returns true when first/second/both files changed
- Returns false when content only differs in whitespace
- Handles empty file list and single file cases
- Tests getChromiumHeadSha and getChromiumFileContent utilities
Copy link
Member

@jkleinsc jkleinsc left a comment

Choose a reason for hiding this comment

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

@claude use fetch instead of writing your own get method

Simplify chromium-gitiles.ts by using Node.js native fetch API
instead of manually implementing HTTP requests with the https module.
d(`Found existing PR: #${pr.number} opened by ${pr.user.login}`);

// Check to see if automatic roll has been temporarily disabled
const hasPauseLabel = pr.labels.some((label) => label.name === 'roller/pause');
Copy link
Member

Choose a reason for hiding this comment

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

note: at some point we should really pull 'roller/pause' out into src/constants.ts since multiple files now have it duplicated.

const { owner, repo } = REPOS.buildImages;

const diffLink =
`https://chromium.googlesource.com/chromium/src/+log/` +
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
`https://chromium.googlesource.com/chromium/src/+log/` +
'https://chromium.googlesource.com/chromium/src/+log/' +

suggestion(non-blocking): this could be single quotes rather than backticks since there's no substitution in this part which is just being concatenated.

);

const match = content.match(CHROMIUM_SHA_REGEX);
if (!match || !match[1]) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if (!match || !match[1]) {
if (!match?.[1]) {

suggestion(non-blocking): modern syntax is nice

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.

6 participants