Skip to content

backwards compat for GITHUB_TOKEN from env#133

Merged
softprops merged 2 commits intomasterfrom
fix-github-token-backwards-compat
Jul 30, 2021
Merged

backwards compat for GITHUB_TOKEN from env#133
softprops merged 2 commits intomasterfrom
fix-github-token-backwards-compat

Conversation

@softprops
Copy link
Owner

@softprops softprops commented Jul 30, 2021

fixes #132 that highlighted a regression in #83

@softprops softprops marked this pull request as ready for review July 30, 2021 22:39
export const parseConfig = (env: Env): Config => {
return {
github_token: getInput("token") || env.GITHUB_TOKEN || "",
github_token: env.GITHUB_TOKEN || env.INPUT_TOKEN || "",
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note all inputs are just env variables prefixed with INPUT_. we gain easy unit testability from leveraging this fact

@softprops softprops merged commit 8779b82 into master Jul 30, 2021
@softprops softprops deleted the fix-github-token-backwards-compat branch July 30, 2021 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Does not trigger other workflows anymore

1 participant