Skip to content

Handle Push and Pull Request events having multiple config file changes. #887

@decyjphr

Description

@decyjphr

Situation:

The code was not handling cases where a push will have multiple file changes. It would only make the changes to the last changed file or cannot handle commits with multiple sub-org and repo files in it. Similarly a PR can have many file changes per commit and also may have many commits as part of the PR. All the changed files must be evaluated as part of the checks.

Proposal

Rewrite the logic so that we get all the files in the PR and process all the repo config changes and sub-org config changes in a batch. Currently, the API we are using doesn't return all the files in the PR.
Similarly when there is a push to the default branch of the config repo, it could have multiple files in it and we should process all the changes as a batch.

Note

The current implementation tried to handle it but was not working correctly

This will also make it easier for us to address issues like #818 where safe-settings deployed as an Actions workflow can also handle pull_request events and run the app in dry-run mode.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions