Skip to content

compute-ci-level: Add TypeScript action for CI level computation - #51

Closed
gursewak1997 wants to merge 1 commit into
mainfrom
compute-ci-level
Closed

gursewak1997 wants to merge 1 commit into
mainfrom
compute-ci-level

Conversation

@gursewak1997

@gursewak1997 gursewak1997 commented Aug 19, 2026 •

Copy link
Copy Markdown

Determines which CI jobs to run based on event type, PR labels, merge-queue status, and whether only documentation files changed. This replaces inline bash in individual repo workflows with a shared, testable TypeScript action.

Docs-only PRs (all changed files are .md) skip heavy test jobs, saving CI runner time for process/governance changes.

Determines which CI jobs to run based on event type, PR labels,
merge-queue status, and whether only documentation files changed.
This replaces inline bash in individual repo workflows with a
shared, testable TypeScript action.

Docs-only PRs (all changed files are .md) skip heavy test jobs,
saving CI runner time for process/governance changes.

Assisted-by: AI
Signed-off-by: gursewak1997 <gursmangat@gmail.com>
const prNumberStr = core.getInput("pr_number");
const prLabelsStr = core.getInput("pr_labels");

const packageOsFull = core.getInput("package_os_full");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This stuff is complicated. I think for something generic we should probably have this just boil down to "run the tests" and not have e.g. "package/upgrade matrix" logic as something this code knows about.

BTW: one way to iterate on this that will probably be easier is to land it in the bootc repo first, and then we factor out working shared code from there.

It's possible to have "reusable" actions stored in a repo itself.

import * as github from "@actions/github";

async function isMergeQueueEnabled(
octokit: ReturnType<typeof github.getOctokit>,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm not at all opposed to using the JS API, but...it is kind of tempting I think to have a zero-dependency version of this that just forks the gh cli.

@gursewak1997

gursewak1997 commented Aug 19, 2026 •

Copy link
Copy Markdown
Author

Closing per above feedback; will land in bootc first as a local reusable action with simpler scope, then factor out shared code from there.

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.

2 participants