Skip to content

Commit

Permalink
added args script
Browse files Browse the repository at this point in the history
  • Loading branch information
LamaAni committed Feb 8, 2021
1 parent 627aa70 commit d726973
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions parse_commit_args.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ async function parse_args(context = null) {
if (key.startsWith('_')) continue
core.setOutput(key, args[key])
}

return args
}

module.exports = {
Expand Down
3 changes: 2 additions & 1 deletion parse_commit_args.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const { CommitArgs, parse_args } = require('./parse_commit_args')

async function test_context(context) {
const args = await new CommitArgs().load_context(context)
const args = await parse_args(context)
console.log('------------------------')
console.log(args)
console.log('------------------------')
Expand All @@ -13,6 +13,7 @@ async function main() {
// )
// await test_context(require('./.local/example_release_context.json'))
// await test_context(require('./.local/example_pr_context.json'))
process.env.RUN_SCRIPT="console.log('lama'); args.lama=11"
await test_context(require('./.local/example_push_context.json'))
}

Expand Down

0 comments on commit d726973

Please sign in to comment.