github / safe-settings

ISC License
616 stars 148 forks source link

Repository settings not being updated in 2.0.12 #299

Closed andreas-borglin closed 2 years ago

andreas-borglin commented 2 years ago

Problem Description

I have updated our safe-settings deployment to 2.0.12 and it seems the updating of general repo settings are broken, such as "has_projects", "has_wiki", etc. Note that we are using suborgs configurations. The branches section works fine and protection rules etc are detected and updated correctly.

What is actually happening

The app does detect the changes from looking at cloudwatch:

  | 2022-09-29T14:09:03.892+01:00 | DEBUG (event): Result of comparing repo for changes = {
  | 2022-09-29T14:09:03.892+01:00 | "additions": {},
  | 2022-09-29T14:09:03.892+01:00 | "modifications": {
  | 2022-09-29T14:09:03.892+01:00 | "has_projects": false,
  | 2022-09-29T14:09:03.892+01:00 | "name": "gradle-scripts"
  | 2022-09-29T14:09:03.892+01:00 | },
  | 2022-09-29T14:09:03.892+01:00 | "hasChanges": true
  | 2022-09-29T14:09:03.892+01:00 | }

However, these changes are not applied and there is no log entry in the GitHub app log after "push" to indicate that it has attempted to update anything.

The last thing I can see in the logs is DEBUG (event): Not run in nop, not sure if that is relevant.

What is the expected behavior

That the top level repo settings should be updated when changed in the settings file.

Context

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

Our own, deployed to AWS via serverless.

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

Github.com

Version of probot/settings

2.0.12

decyjphr commented 2 years ago

Hi, I am able to recreate this issue. This doesn't happen in 2.0.11. So it must have been introduced in 2.0.12. Checking to see the diffs

andreas-borglin commented 2 years ago

Nice one @decyjphr , thanks for speedy fix!