-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a CLI to build a github context and trigger a job
- Loading branch information
Barry Gordon
committed
Sep 13, 2021
1 parent
29644f5
commit 3a2b93d
Showing
9 changed files
with
59 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| # Updater output | ||
| output/output.json | ||
| repo | ||
| tmp/ | ||
|
|
||
| # Dependency directory | ||
| node_modules | ||
|
|
||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| #!/usr/bin/env node | ||
|
|
||
| import {Command} from 'commander' | ||
| import {Context} from '@actions/github/lib/context' | ||
| import {run} from './main' | ||
|
|
||
| const cli = new Command() | ||
|
|
||
| cli | ||
| .version('0.0.1') | ||
| .description('Run an update against the specified Dependabot API service') | ||
| .requiredOption('-j, --job-id <id>', 'Job ID is required.') | ||
| .requiredOption('-t, --job-token <token>', 'Job token required.') | ||
| .requiredOption( | ||
| '-c, --credentials-token <token>', | ||
| 'Job credentials token is required.' | ||
| ) | ||
| .requiredOption( | ||
| '-d, --dependabot-api-url <url>', | ||
| 'A URL for Dependabot API is required.' | ||
| ) | ||
| .option( | ||
| '-d, --dependabot-api-docker-url <url>', | ||
| 'A URL to be used to access the API from Dependabot containers.' | ||
| ) | ||
| .parse(process.argv) | ||
|
|
||
| const options = cli.opts() | ||
| const ctx = new Context() | ||
| ctx.eventName = 'workflow_dispatch' | ||
| ctx.payload = { | ||
| inputs: options | ||
| } | ||
|
|
||
| run(ctx) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters