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

Explicitly ignoring repositories when using a GitHub App with install on all repositories #608

Closed
jamietanna opened this issue Nov 18, 2024 · 5 comments

Comments

@jamietanna
Copy link
Contributor

jamietanna commented Nov 18, 2024

When setting up a GitHub App with install on all repositories, we would like to exclude specific repositories from being processed.

For instance, there are some repositories that we want to only enable for the development GitHub App, which is installed with install on selected repositories.

However, the production GitHub App can access + process all repos, so there's then a little bit of "fighting" between bots

This configuration would allow us to provide an exclusion of i.e. org/repo,another-org/repo etc

Each GitHub App is configured on a separate Mend Renovate CE

@jamietanna
Copy link
Contributor Author

This could be related to #520 but is a slightly different view - we've got an active repo that we want to snooze/disable one of our GitHub Apps on

@rarkins
Copy link
Member

rarkins commented Nov 18, 2024

Does autodiscoverFilter work?

@jamietanna
Copy link
Contributor Author

We'd not given that a go - my understanding of autodiscoverfilter was that when there are many negations it could get a little awkward

i.e. would it be:

{
  "autodiscoverFilter": [
		"!/org\/repo/",
		"!/another-org\/repo/"
	]
}

To allow us to exclude those two repos from any auto-discovered repos?

@jamietanna
Copy link
Contributor Author

I notice that autodiscoverfilter indicates multiple negations should be avoided?

Coming back to this - looking at this we'd need to use MEND_RNV_AUTODISCOVER_FILTER, preferably with only one regex that could negate any pattern(s) we need, in a single regex?

@jamietanna
Copy link
Contributor Author

Closing as Rhys' original comment is correct - using MEND_RNV_AUTODISCOVER_FILTER with a single regex is the option here - i.e.

MEND_RNV_AUTODISCOVER_FILTER="!/(org\/repo|another-org\/repo)/"

We've set up a small test harness for validating this, to catch any issues in the future, which calls in to i.e.

  const autodiscover = require('renovate/dist/workers/global/autodiscover')
// ...
  const actual = autodiscover.applyFilters(repos, [filter])
// ...

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