Skip to content
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

Add external configuration file #228

Merged
merged 24 commits into from Sep 22, 2022
Merged

Add external configuration file #228

merged 24 commits into from Sep 22, 2022

Conversation

febuiles
Copy link
Contributor

@febuiles febuiles commented Sep 6, 2022

We are bringing back the behavior from #91 where users can customize the action through an external configuration file.

Acceptance Criteria

  • Users can supply a custom path to an external configuration file.
  • If an external file is specified, the options in there take precedence over the inline ones.

@febuiles febuiles marked this pull request as ready for review September 21, 2022 14:53
@febuiles febuiles requested a review from a team as a code owner September 21, 2022 14:53
Copy link
Contributor

@sarahkemi sarahkemi left a comment

Choose a reason for hiding this comment

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

🙌🏽 looks great, this is going to be so useful!!

README.md Outdated Show resolved Hide resolved
// pass inline options in the presence of an external config file.
const inlineConfig = readInlineConfig()
// the external config takes precedence
return Object.assign({}, inlineConfig, config)
Copy link
Contributor

Choose a reason for hiding this comment

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

TIL about Object.assign, nicee.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

TBH I brought this from plain JS and I'm sure there's a prettier way to do this in 2022 with TS (@brphelps @hmaurer maybe?)

Copy link
Contributor

Choose a reason for hiding this comment

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

Co-authored-by: Sarah Aladetan <sarahkemi@github.com>
@febuiles febuiles merged commit 29cdbbe into main Sep 22, 2022
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.

None yet

3 participants