Skip to content
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

DM-35149: Integrate GitHub Checks API for validating YAML configs in repositories #40

Merged
merged 9 commits into from
Jun 23, 2022

Commits on Jun 23, 2022

  1. Add models for check suite and check run payloads

    These are the webhook event payloads for check suites and check runs,
    and corresponding models that can be obtained with GitHub's API.
    
    These are checks with examples from GitHub's webhook docs.
    jonathansick committed Jun 23, 2022
    Configuration menu
    Copy the full SHA
    f49ec0d View commit details
    Browse the repository at this point in the history
  2. Add services for GitHub check runs

    This catches check suite/run related GitHub webhook events, fires off
    async tasks and, creates + computes check runs in the GitHubRepoService.
    jonathansick committed Jun 23, 2022
    Configuration menu
    Copy the full SHA
    075dfdf View commit details
    Browse the repository at this point in the history
  3. Automatically run check_run for check_suite

    Rather than wait for the check_run webhook, we can actually run the
    check run immediately given the result from the check run creation
    endpoint.
    jonathansick committed Jun 23, 2022
    Configuration menu
    Copy the full SHA
    ee1c2bd View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a5ac198 View commit details
    Browse the repository at this point in the history
  5. Make git_ref optional in checkout model

    It's convenient to know the git_ref corresponding to a checkout, but in
    truth only the head_sha is required. We're making it "optional" here to
    allow users to still set this metadata if relevant.
    jonathansick committed Jun 23, 2022
    Configuration menu
    Copy the full SHA
    1ef6e71 View commit details
    Browse the repository at this point in the history
  6. Add GitHubRepositoryCheckout.create

    This classmethod makes it possible for a GitHubRepositoryCheckout to
    create itself from a github client, repository, and sha. This eliminates
    need for the "create_checkout" method on the RepositoryService. Overall
    this means it's easier to create checkouts from different parts of the
    code, which will be useful when writing the check run validation code.
    jonathansick committed Jun 23, 2022
    Configuration menu
    Copy the full SHA
    239f6d3 View commit details
    Browse the repository at this point in the history
  7. Implementation a check run for YAML configs

    This is an initial attempt at implementing a check run, GitHubConfigsCheck,
    that reports Pydantic validation errors.
    jonathansick committed Jun 23, 2022
    Configuration menu
    Copy the full SHA
    af64f58 View commit details
    Browse the repository at this point in the history
  8. Fix handling re-requested check run

    - There was a typo in the function name
    - No need to validate the app id for rerequests (and in fact, we were
      probably checking the wrong thing?
    jonathansick committed Jun 23, 2022
    Configuration menu
    Copy the full SHA
    8d2b0b9 View commit details
    Browse the repository at this point in the history
  9. Update change log

    jonathansick committed Jun 23, 2022
    Configuration menu
    Copy the full SHA
    0adca9e View commit details
    Browse the repository at this point in the history