-
Notifications
You must be signed in to change notification settings - Fork 182
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
Sync settings after App installation #178
base: master
Are you sure you want to change the base?
Sync settings after App installation #178
Conversation
|
||
robot.on('installation_repositories.added', async context => { | ||
const { payload } = context | ||
const { repositories_added: repositories, installation } = payload |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that this is very similar to the installation
event. Have you considered doing something like repositories = payload.repositories | payload.repositories_added
and just combine the two events.
am i correct in understanding that this would directly update the file in the default branch? if so, it seems dangerous to do this without submitting the changes as a PR to give the repository maintainer a change to review and accept the changes. if a project already has the settings file, it's likely that there is a reason for it to include the contents that it does, even if it should be supplemented with additional details. |
What do you mean with directly updating the settings file? The flow this results in:
|
sorry, i definitely misunderstood the goal. i was thinking about the opposite situation where a repo without an existing file would have one created by pulling the existing settings for that repo through the api and written to the config file. i think there was an issue for that at one point, so i think i made the wrong assumption before reading deeply enough. with a better understanding now, i do see high value to this. i have been really busy lately, but will try to look through your PR soon and give feedback soon. |
e36f4bd
to
5d17e60
Compare
5d17e60
to
c3cdb68
Compare
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? |
sorry that i still havent gotten to this, but it is still on my radar |
Maybe ping @travi ? 😊 |
Is there anything blocking this PR @travi? Currently, an org admin configuring a new repo needs to do two tasks in order:
If they do those in the wrong order, then it's very easy for them to be under the mistaken impression that the repo has been configured safely. This leaves the repo significantly vulnerable until either the settings are updated or an admin notices the missing rules. That condition is especially likely when creating repos from a template, as the template is likely to have the settings file already. |
Fixes #1
Implementation has overlap with #179