-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: get input from @actions/core instead of env #11
base: main
Are you sure you want to change the base?
chore: get input from @actions/core instead of env #11
Conversation
6ef460b
to
8eef1a5
Compare
This comment was marked as resolved.
This comment was marked as resolved.
assert(!!process.env.UPSTREAM_REPO, '`upstreamRepo` is required.') | ||
assert(!!process.env.HEAD_REPO, '`headRepo` is required.') | ||
assert(!!process.env.TRACK_FROM, '`trackFrom` is required.') | ||
assert(typeof core !== 'undefined', `core is undefined, which probably means you're not running in a GitHub Action`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this assertion mean that we can no longer test the whole logic in our local environments?
If so, how we can test its behavior before release?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honestly, I don't recall. This PR is so old, I've completely forgotten the context of this code, but I think this came from example code somewhere. I'll have to dig to find out the reason for it.
Changes
@actions/core
package instead of from env vars. This reduces config duplication in yaml and avoids manual serialization of inputs.src/index.ts
is running in GitHub action