Skip to content

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

Open
@hilmarf

Description

@hilmarf

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

Activity

added a commit that references this issue on Mar 7, 2025
linked a pull request that will close this issue on Mar 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @hilmarf

      Issue actions

        don't take fixed: installations[0] · Issue #782 · github/safe-settings