Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ahrefs/monorobot
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: d983684f9baf73fa91c5ec0c5b83a9821f51dd5f
Choose a base ref
...
head repository: ahrefs/monorobot
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: a3eea15e3cb380c78b951d2730fd4fb77c60d887
Choose a head ref
  • 16 commits
  • 28 files changed
  • 1 contributor

Commits on Dec 24, 2020

  1. Configuration menu
    Copy the full SHA
    52950a7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6d428ae View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ba1679a View commit details
    Browse the repository at this point in the history

Commits on Dec 28, 2020

  1. Configuration menu
    Copy the full SHA
    b31adf1 View commit details
    Browse the repository at this point in the history

Commits on Dec 29, 2020

  1. Merge branch 'hotfix/config-init-and-cli-flags'

    * hotfix/config-init-and-cli-flags:
      prepend slash to commits_url
      fix check_gh payload and secrets initialization
      don't try to load state from file on startup if doesn't exist
      print config after initialization
    yasunariw committed Dec 29, 2020
    Configuration menu
    Copy the full SHA
    c42b86f View commit details
    Browse the repository at this point in the history
  2. move config and associated functions from context toplevel to state

    The `Context` toplevel should only store relatively static info that
    applies globally, like the secrets.
    
    When we accommodate multiple repos, a particular repo's config
    should be moved out of the global toplevel context to the runtime
    `State`, where it can coexist with other dynamic, repo-specific info
    like pipeline status.
    yasunariw committed Dec 29, 2020
    Configuration menu
    Copy the full SHA
    b9a0cd9 View commit details
    Browse the repository at this point in the history
  3. make state a hash table mapping repo urls to repo-specific state

    Repo state is namespaced by the full url of the repo, so that
    so that identifiers are unique across platforms (github.com and
    GH Enterprise).
    yasunariw committed Dec 29, 2020
    Configuration menu
    Copy the full SHA
    914406b View commit details
    Browse the repository at this point in the history
  4. modify tests to recreate context per test case

    For each test case, initializes a repo state from file if one exists.
    yasunariw committed Dec 29, 2020
    Configuration menu
    Copy the full SHA
    6e5c4cc View commit details
    Browse the repository at this point in the history
  5. move generic map/table atd bindings into common.atd file

    The bindings should be usable by any file, not just state.atd
    yasunariw committed Dec 29, 2020
    Configuration menu
    Copy the full SHA
    fcbbcd6 View commit details
    Browse the repository at this point in the history
  6. move webhook signature checking logic out of parse_exn

    With repo-specific secrets, we'll need the repo name in order
    to obtain the webhook token used for signature validation. So
    parsing the request body for a GH payload needs to happen before,
    not after, the signature check.
    yasunariw committed Dec 29, 2020
    Configuration menu
    Copy the full SHA
    c0831a9 View commit details
    Browse the repository at this point in the history
  7. allow repo-specific configuration of gh_token and gh_hook_token

    Define custom getters for retrieving GH secret values. As the
    getter for each token type defaults to looking for a global value
    if a repo-specific vaue isn't found, existing deployments don't
    need to change.
    yasunariw committed Dec 29, 2020
    Configuration menu
    Copy the full SHA
    e2a6290 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    0da4a40 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    bdaa5e8 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    19cc0d1 View commit details
    Browse the repository at this point in the history
  11. tests: load secrets and config files per test case

    We can now configure secrets, config, state, and incoming payload
    separately, which lets us test multi-repo behavior more easily.
    yasunariw committed Dec 29, 2020
    Configuration menu
    Copy the full SHA
    753830d View commit details
    Browse the repository at this point in the history
  12. tests: add cases that check repo-specific config loading behavior

    `push.multi_repo_custom_repo_secrets`
    The correct repo-specific secrets configuration should be loaded
    for the given payload repo.
    
    `status.multi_repo_disallowed_repo`
    If `allowed_repositories` excludes the payload repo, it should be
    ignored.
    
    `status.multi_repo_independent_status_state`
    The status rules should be evaluated for the correct repo. In this
    test case, it should correctly detect that `master`'s last build
    status was a failure for the given payload repo, and issue a
    success notification.
    yasunariw committed Dec 29, 2020
    Configuration menu
    Copy the full SHA
    a3eea15 View commit details
    Browse the repository at this point in the history
Loading