Skip to content

Making the most of Github API capabilities on codeowners #11

@ubiratansoares

Description

@ubiratansoares

Before getting started

  • I am not filing a bug/security report.
  • I have looked through the open issues for a duplicate request and could not find it.

What's the problem this feature/enhancement will solve?

Alongside with everything provided at #3 , #4, #5 and others, we should consider that Github also exposes its own validation outcomes through the REST API

Eventually such capability could be useful to save some API calls when validating owners, or eventually double-checking whether our validation correctly mirrors what Github does under the hood

Describe the solution you'd like

There is no clear path on how to use this API, but eventually one approach could be making the most of it according to the HEAD branch we are running canopus.

Eg, for non-main branches:

  • we compute the git diff between and which files are involved
  • we compute whether there are new paths added and whether the Codeowners file was changed
  • we query the Github API for the actually state of CodeOwners
  • we combine this information along with our own validation
  • we report results (eventually as a PR decorationg, using gh)

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions