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

use config.get directly instead of probot's getConfig call #1014

Open
jetersen opened this issue Jan 16, 2022 · 2 comments
Open

use config.get directly instead of probot's getConfig call #1014

jetersen opened this issue Jan 16, 2022 · 2 comments

Comments

@jetersen
Copy link
Member

jetersen commented Jan 16, 2022

Could be improved even more by using: https://github.com/probot/octokit-plugin-config/blob/a613c0efd2873fb64a3a87f79365ec1951fd29ad/src/index.ts#L13 directly, as we would be able to specify a branch to get the config from. Actually this function is even better as it will attempt to use .github repo without using _extends

Originally posted by @jetersen in #365 (comment)

@jetersen jetersen changed the title use getConfigFiles directly instead of probot's getConfig call use config.get directly instead of probot's getConfig call Jan 16, 2022
@mkurz
Copy link
Contributor

mkurz commented Jan 31, 2022

+1
Would be nice to directly reference a file within an organization's .github repository with the config-name config.

@jetersen
Copy link
Member Author

jetersen commented Jan 31, 2022

@mkurz no config-name is one thing.
_extends by default will extend to .github repo on org.
See: https://github.com/probot/octokit-plugin-config/blob/a613c0efd2873fb64a3a87f79365ec1951fd29ad/src/util/get-config-files.ts#L42-L46

you can of course also specify that your _extends if you want to use another repo or another file. See: #935 (comment)
I don't think _extends should take an branch argument.

_extends also support file names: See https://github.com/probot/octokit-plugin-config/blob/a613c0efd2873fb64a3a87f79365ec1951fd29ad/src/util/extends-to-get-content-params.ts#L8-L15

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

No branches or pull requests

2 participants