You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 14, 2019. It is now read-only.
Repository navigation
This repository was archived by the owner on Sep 14, 2019. It is now read-only.
One of the ideas a few people have been kicking around in the @probot community and within GitHub is the idea of treating a repository named .github as a special org-wide configuration repository.
Maybe even consider also looking in .github automatically. This will double the number of API requests for looking up config files, but would make make the .github repository a convention across probot apps.
👍 I think this would be a great option for larger orgs, where the .github folder in every repo takes up space. It creates a nice repo for discussing org level administrative issues and the like. I think it is a powerful precedent to set, but obviously with the existing support.
I'm a fan of these ideas. In addition to the benefit for larger orgs, there are also projects that largely act as mirrors, where it is undesirable to change the upstream repo just to configure an app the runs on the mirror.
For 2, is the idea that all configs would, by default, extend org/.github? (That would make sense to me)
For example, the stale app requests read-only access for the .github/stale.yml file path. Let's suppose the app is installed for the .github and test repo.
Accessing the config in the test repo will work as expected, but the current implementation will look for the stale.yml file path in the .github repo, when the config is not present in the test repo, or when we explicitly set the .github repo for the _extends config option. The config path that we extend from could also be set to anything else by users.
Additionally, you can specify a specific path for the configuration by
appending a colon after the project.
```yaml
_extends: probot-settings:.github/other_test.yaml
other: FFF
```
Note that by default, inherited configurations are in the **exact same
location** within the repositories. However, if a base repository is named
`.github`, the default config path is relative to the root of the repository
rather than relative to a `.github/` directory.
```yaml
# octocat/repo1:.github/test.yaml
_extends: .github
other: GGG
# octocat/.github:test.yaml
other: HHH
```
Additionally, if there is no config file, but there is a repo in the org named
`.github`, it will be used as a base repository.
```yaml
# octocat/repo1:.github/test.yaml <-- missing!
# octocat/.github:test.yaml
other: III
```
It looks like you can access the config files regardless of the single file permission if the repository is public, so the single file permission likely comes into play for private repos, though I'm not able to test that part 😋.
It seems we would need to request read-only access to repository contents just to read the config files, or we would need to require that the .github repo (and any other repo where a custom _extends path is pointed to) be public.
This is easy to control in internal/self-deployed apps, but can lead to confusion during the use of a hosted app that works with probot-config.
Config file access could be explained in the README, so any app using probot-config can link to it from their own config/docs.
I think it makes more sense to make even the .github repo require .github/ instead of at the root level. It solves this for both public and private repos, and reduces the API load. Maybe deprecate the old behavior and do it as a fallback.
Basically revert #6 (which seems to have not thought about private repos) and add in a fallback for anyone depending on #6 functionality temporarily.
Activity
hiimbex commentedon Apr 5, 2018
👍 I think this would be a great option for larger orgs, where the
.githubfolder in every repo takes up space. It creates a nice repo for discussing org level administrative issues and the like. I think it is a powerful precedent to set, but obviously with the existing support.itaditya commentedon Apr 5, 2018
I also love this idea
cco3 commentedon May 16, 2018
I'm a fan of these ideas. In addition to the benefit for larger orgs, there are also projects that largely act as mirrors, where it is undesirable to change the upstream repo just to configure an app the runs on the mirror.
For 2, is the idea that all configs would, by default, extend org/.github? (That would make sense to me)
dessant commentedon Jun 23, 2018
How will single file permissions work when a config file extends from the
.githubrepo? Wouldn't it fail when accessing the config from the repo root?dessant commentedon Jun 23, 2018
For example, the
staleapp requests read-only access for the.github/stale.ymlfile path. Let's suppose the app is installed for the.githubandtestrepo.Accessing the config in the
testrepo will work as expected, but the current implementation will look for thestale.ymlfile path in the.githubrepo, when the config is not present in thetestrepo, or when we explicitly set the.githubrepo for the_extendsconfig option. The config path that we extend from could also be set to anything else by users.probot-config/README.md
Lines 44 to 74 in def82e6
It looks like you can access the config files regardless of the single file permission if the repository is public, so the single file permission likely comes into play for private repos, though I'm not able to test that part 😋.
It seems we would need to request read-only access to repository contents just to read the config files, or we would need to require that the
.githubrepo (and any other repo where a custom_extendspath is pointed to) be public.This is easy to control in internal/self-deployed apps, but can lead to confusion during the use of a hosted app that works with probot-config.
Config file access could be explained in the README, so any app using probot-config can link to it from their own config/docs.
gr2m commentedon Jun 25, 2018
I think this issue can be closed, but I would suggest to create a follow up issue regarding @dessant comment
My assumption is that if the
.githubrepo is private and the app has only single file access like.github/my-app.ymlthen it will failz-hirschtritt commentedon Jul 6, 2018
Are we planning on cutting a release for this change?
nesl247 commentedon Jul 6, 2018
I think it makes more sense to make even the .github repo require
.github/instead of at the root level. It solves this for both public and private repos, and reduces the API load. Maybe deprecate the old behavior and do it as a fallback.Basically revert #6 (which seems to have not thought about private repos) and add in a fallback for anyone depending on #6 functionality temporarily.
bkeepers commentedon Jul 12, 2018
0.2.0 has been released with this feature. Huge 👏 to @cco3 for working on this, and @hiimbex for giving feedback and review.
nesl247 commentedon Jul 12, 2018
@bkeepers Should we open another issue then given that this does not work well for private repos?
dessant commentedon Jul 12, 2018
@nesl247, yes, though we could just document the limitation instead of reverting.
nesl247 commentedon Jul 12, 2018
I've opened #13 to discuss it.