···
import * as core from '@actions/core'
import { getOctokit } from '@actions/github'
10
-
async function run(action, owner, repo, pull_number, dry = true) {
10
+
async function run(action, owner, repo, pull_number, options = {}) {
const token = execSync('gh auth token', { encoding: 'utf-8' }).trim()
const github = getOctokit(token)
···
···
.argument('<owner>', 'Owner of the GitHub repository to check (Example: NixOS)')
.argument('<repo>', 'Name of the GitHub repository to check (Example: nixpkgs)')
.argument('<pr>', 'Number of the Pull Request to check')
59
-
.action(async (owner, repo, pr) => {
60
+
.option('--no-cherry-picks', 'Do not expect cherry-picks.')
61
+
.action(async (owner, repo, pr, options) => {
const commits = (await import('./commits.js')).default
61
-
run(commits, owner, repo, pr)
63
+
run(commits, owner, repo, pr, options)
···
process.env.GITHUB_WORKSPACE = tmp
77
-
run(labels, owner, repo, pr, options.dry)
79
+
run(labels, owner, repo, pr, options)
rmSync(tmp, { recursive: true })