Re-add functionality to sync GitHub apps#2255
Conversation
Dry-run check results |
|
To recap, we are still using a PAT to deploy, but we are using a GitHub App for the dry run. I will give read access to the following resources to the sync-team-app github app:
|
|
From the dry run it looks like we are about to remove all apps: Maybe it's because the token doesn't have enough permission even after enabling those other fields? |
This comment has been minimized.
This comment has been minimized.
…alled with an app token
|
maybe if you update the branch the dry run will run? 🤔 |
|
But first, can you edit the github actions workflows to add the environments and secrets you mentioned? After, I will set them 👍 |
|
The dry run executed, but it failed, because the environment variables weren't set. |
|
I think stuff like |
|
I set the secret |
|
Testing this PR in #2379 |
|
In #2379 I got the error
You should filter orgs that are not part of the rust enterprise. |
|
or maybe #2381 is the fix for this 🤔 |

This essentially reverts rust-lang/sync-team#128, plus adapts to code to changes that happened in the meantime.
This is one of the most complicated (and frankly stupid) APIs I had to deal with... It almost seems like they designed each related endpoint to return slightly different data, and require different tokens/permissions/authentication type in order to get all the information that we need.
The following environment variables have to be configured for the dry-run workflow:
ENTERPRISE_NAME: justrust-langENTERPRISE_APP_ID: app ID ofsync-team-app-read(2885328)ENTERPRISE_APP_INSTALLATION_ID: installation ID ofsync-team-app-readin therust-langenterprise (110701681)ENTERPRISE_APP_SECRET_KEY: secret key of the GH app (not gonna paste that in here :) )Fixes: #1915