probot / stale

A GitHub App built with Probot that closes abandoned Issues and Pull Requests after a period of inactivity.
https://probot.github.io/apps/stale/
ISC License
1.25k stars 212 forks source link

Use organisation configuration #220

Closed faustbrian closed 4 years ago

faustbrian commented 5 years ago

Does the stale bot currently support reading of the configuration from the organisation wide .github repository or would that same configuration need to be added to every single repository in the organisation?

See https://github.com/ArkEcosystem/.github/blob/master/stale.yml for example.

issue-label-bot[bot] commented 5 years ago

Issue Label Bot is not confident enough to auto-label this issue. See dashboard for more details.

AdmiringWorm commented 5 years ago

@faustbrian you can have a repository that contain the main configuration of stale, then in each repository just add the stale.yml file with an extend element (only needed if you need to configure it further for the repo).

See the following comment for more information: https://github.com/probot/stale/issues/141#issuecomment-402006522

faustbrian commented 5 years ago

So just having the global repository like ArkEcosystem/.github which contains a stale.yml should be enough to make it work without any further stale.yml files in other repositories if I don't have the need for further configuration if I got that right.

Then the question is why the bot isn't running on the organisation as it was installed a few days ago and said it will run after maximum 24 hours for the first time. Could the file location maybe be wrong?

  1. ArkEcosystem/.github/stale.yml
  2. ArkEcosystem/.github/.github/stale.yml

Currently I have the file at location 1 but #141 seems to indicate that option 2 is looked for even with the global .github repository which itself would represent the .github folder.

AdmiringWorm commented 5 years ago

So just having the global repository like ArkEcosystem/.github which contains a stale.yml should be enough to make it work without any further stale.yml files in other repositories if I don't have the need for further configuration if I got that right.

If I have understood everything correct, then yes that should be enough. Assuming that you have also added the stale bot to the repositories you want it to run on as well. I have never done it that way myself though, I have always added a stale.yml file in my own repo with the _extends: .github though.

Currently I have the file at location 1 but #141 seems to indicate that option 2 is looked for even with the global .github repository which itself would represent the .github folder.

option 2 would be correct in this case, using option 1 won't work.

faustbrian commented 5 years ago

Thanks, then there must be another issue as the stale bot is enabled on all repositories I want to use it on and the configuration is also in the right place since yesterday evening.

Will see if it runs within 24 hours from now or not.

faustbrian commented 5 years ago

Still hasn't run, will give the .github/stale.yml directly inside each repository a try.

AndrewTriesToCode commented 5 years ago

@faustbrian Did you ever have any success with this?

faustbrian commented 5 years ago

@achandlerwhite I got it working with the setup of the below links.

https://github.com/ArkEcosystem/.github/tree/master/.github https://github.com/ArkEcosystem/core/blob/master/.github/stale.yml

GitHub
ArkEcosystem/.github
Organization-wide GitHub Configuration. Contribute to ArkEcosystem/.github development by creating an account on GitHub.
GitHub
ArkEcosystem/core
The ARK Blockchain. Check https://learn.ark.dev for more information. - ArkEcosystem/core
AndrewTriesToCode commented 5 years ago

Thanks for the quick reply! I see, you had to put the _extends line in the other repo. It's a shame it doesn't work like the documentation states and you have to do that workaround.

faustbrian commented 5 years ago

I sure is a bit of an annoyance but at least it works with the workaround for now, maybe there will be a solution to this at some point by someone else.

diwakergupta commented 4 years ago

Per the documentation, org-wide config stored in a .github repo should be honored?:

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.

I have a setup for the @blockstack org: https://github.com/blockstack/.github/blob/master/.github/stale.yml

But it's not being applied to any of the repositories. Seems like either the documentation is incorrect or there's a bug in stale bot?

GitHub
blockstack/.github
Repository to hold defaults such as CONTRIBUTING and CODE_OF_CONDUCT - blockstack/.github