Repository navigation
compute-ci-level: Add TypeScript action for CI level computation - #51
gursewak1997 wants to merge 1 commit into
Conversation
6a4ca7d to
78a77e1
Compare
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>
78a77e1 to
852553d
Compare
| const prNumberStr = core.getInput("pr_number"); | ||
| const prLabelsStr = core.getInput("pr_labels"); | ||
|
|
||
| const packageOsFull = core.getInput("package_os_full"); |
There was a problem hiding this comment.
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>, |
There was a problem hiding this comment.
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.
|
Closing per above feedback; will land in bootc first as a local reusable action with simpler scope, then factor out shared code from there. |
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.