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

don't take fixed: installations[0] #782

Open
hilmarf opened this issue Mar 7, 2025 · 0 comments · May be fixed by #783
Open

don't take fixed: installations[0] #782

hilmarf opened this issue Mar 7, 2025 · 0 comments · May be fixed by #783
Labels
bug Something isn't working

Comments

@hilmarf
Copy link

hilmarf commented Mar 7, 2025

Problem Description

Running as GHA, with multiple apps being installed (in different orgs), but not all have the same ADMIN_REPO incl. the settings, let the app fail.

What is actually happening

We had a scenario, where one app was installed in multiple different orgs (one enterprise account and two personal accounts). When the app is now executed as GHA, it is checking for its installations and always just uses the first occurrence, when there are more than one.

What is the expected behavior

Do NOT simply use the first installation, but instead use the one, which matches the GH_ORG environment setting.

Error output, if available

DEBUG (github): GitHub request: GET https://api.github.com/repos/<private-account>/.github/contents/safe-settings%2Fsettings.yml - 404
ERROR (probot): Error getting settings HttpError: Not Found
Unexpected error during full sync: TypeError: Cannot read properties of undefined (reading 'data')

Context

Are you using the hosted instance of probot/settings or running your own?

running your own as described in https://github.com/github/safe-settings/blob/main-enterprise/docs/github-action.md

If running your own instance, are you using it with github.com or GitHub Enterprise?

on github.com

Version of probot/settings

2.1.16

@hilmarf hilmarf added the bug Something isn't working label Mar 7, 2025
hilmarf added a commit to hilmarf/safe-settings that referenced this issue Mar 7, 2025
@hilmarf hilmarf linked a pull request Mar 7, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant