ci/github-script/prepare: init from actions/get-merge-commit
This just moves the code over to ci/github-script to make it easy to test and iterate on locally. The name `prepare` is chosen, because the script will be extended with the other steps from "PR / prepare" next.
This commit is contained in:
@@ -39,6 +39,17 @@ async function run(action, owner, repo, pull_number, dry = true) {
|
||||
})
|
||||
}
|
||||
|
||||
program
|
||||
.command('prepare')
|
||||
.description('Prepare relevant information of a pull request.')
|
||||
.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')
|
||||
.action(async (owner, repo, pr) => {
|
||||
const prepare = (await import('./prepare.js')).default
|
||||
run(prepare, owner, repo, pr)
|
||||
})
|
||||
|
||||
program
|
||||
.command('commits')
|
||||
.description('Check commit structure of a pull request.')
|
||||
|
||||
Reference in New Issue
Block a user