Skip to content

Github SafeSettings invokes DELETE API on incorrect settings #310

@sajithvasu

Description

@sajithvasu

Hello,

Github Safesettings calls the DELETE api to remove all the repositories when you add incorrect config in the settings.yml file. Error seems to be bit concerning as it calls delete api. Also, the error states that it will remove the repo on Mon, 01 Feb 2021.

Sanitized logs:
←[92mxxxx-safesettings-←[0m ←[32mxxxx-safesettings←[0m [@octokit/request] "DELETE https://api.github.com/teams/5430398/repos/{org}/{repo}" is deprecated. It is scheduled to be removed on Mon, 01 Feb 2021 00:00:00 GMT. See https://developer.github.com/changes/2020-01-21-moving-the-team-api-endpoints/
←[92mxxxx-safesettings←[0m ←[32mxxxx-safesettings←[0m error calling find for Teams HttpError: You cannot remove repositories from a security manager team. for repo: {"owner":"{org}","repo":"{repo}","branch":"main","required_pull_request_reviews":{"required_approving_review_count":1},"enforce_admins":null,"restrictions":null,"headers":{"accept":"application/vnd.github.hellcat-preview+json,application/vnd.github.luke-cage-preview+json,application/vnd.github.zzzax-preview+json"}} entries [{"name":"security-reader","permission":"security-scan-reviewer"}]

settings.yml:

repository:
teams:
  - name: security-reader
    permission: security-scan-reviewer
branches:  
  - name: default
    protection:      
      required_pull_request_reviews:
        required_approving_review_count: 1
      enforce_admins: 
      restrictions:

Note: We are building the docker image from the dockerFile provided in this repo and running the app on AKS platform.

Is this a bug within the code?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions