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

Organization repo name and config... match probot? #27

Closed
jpoehnelt opened this issue Aug 11, 2021 · 3 comments
Closed

Organization repo name and config... match probot? #27

jpoehnelt opened this issue Aug 11, 2021 · 3 comments

Comments

@jpoehnelt
Copy link

create a repository named .allstar in your organization

Many GitHub apps are based on Probot and default to the .github repository for organization config. The default setting of this app requires splitting config into yet another repository.

At a minimum it would be nice if this app allowed specifying the org config location.

It would be nice to mirror https://probot.github.io/docs/best-practices/#configuration.

@jpoehnelt jpoehnelt changed the title Organization repo name Organization repo name and config... match probot? Aug 11, 2021
@jeffmendoza
Copy link
Member

I would be worried about name collisions. I believe GitHub itself sort of "owns" the namespace of that repo, same with .github directory in repos. ex: https://docs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/creating-a-default-community-health-file

Being able to configure it sounds great. A bit of a chicken and egg problem, where do you configure the configuration location. Happy to hear any proposals.

@jpoehnelt
Copy link
Author

I believe GitHub itself sort of "owns" the namespace of that repo

That really isn't the case and many apps follow the probot pattern. https://probot.github.io/docs/best-practices/#configuration

Any configuration should be stored in the target repository. Unless the app is using files from an established convention, the configuration should be stored in the .github directory. See the API docs for context.config.

context.config supports sharing configs between repositories. If configuration for your app is not available in the target repository, it will be loaded from the .github directory of the target organization's .github repository.

User's can also choose their own shared location. Use the _extends option in the configuration file to extend settings from another repository.

@jeffmendoza
Copy link
Member

Even if a popular bot framework uses the repo by default, it doesn't change whether GitHub considers it their namespace or not. We can assume that GitHub wouldn't do anything to break a large swath of apps. We can guess that an allstar directory in that repo would be safe from collisions, but I'd rather not assume or guess.

That said, supporting config it .github should be doable. I was thinking we don't even need to have a "config location config" but just a priority order. Look for .allstar first, if it doesn't exist then .github/allstar second.

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