Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

Bugfix: Check suite re-run handling #133

Merged
merged 4 commits into from
Sep 9, 2020
Merged

Bugfix: Check suite re-run handling #133

merged 4 commits into from
Sep 9, 2020

Conversation

rrotaru
Copy link
Contributor

@rrotaru rrotaru commented Sep 4, 2020

I noticed that my check re-runs were hanging without completing. It turns out that the rerunChecks() handler expected us to pass a config argument that is not there. I am updating it to follow the same process as the other PR handlers.

Proposed Changes

  • Add calls to collect config on check re-run event
  • Update payload references for check re-run config gathering

Readiness Checklist

  • If this change requires documentation, it has been included in this pull request

Reviewer Checklist

  • If a functional change has occurred, testing the integration has been performed
  • This PR has been categorized with a label (1 of automation, bug, documentation, enhancement, infrastructure, or performance) for the changelog

Add calls to collect config on check re-run event
Update payload references for check re-run config gathering
@rrotaru
Copy link
Contributor Author

rrotaru commented Sep 4, 2020

Not sure why this is failing. The CI test error says:

    TypeError: Cannot read property 'owner' of undefined

      93 |     // Get config default from org-level repo .github/rally/<REPO_NAME>.yml
      94 |     let orgConfigResponse = await context.github.repos.getContents({
    > 95 |       owner: context.payload.repository.owner.login,
         |                                         ^
      96 |       repo: orgConfigRepoName,
      97 |       path: '.github/rally/' + context.payload.repository.name + '.yml'
      98 |     })

      at RallyValidate.getDefaultConfig (lib/RallyValidate.js:95:41)
      at RallyValidate.handlePullRequest (lib/RallyValidate.js:141:38)
      at Object.<anonymous> (test/RallyValidate.test.js:79:21)

But the API docs show that this should be present (it is working in GHE).
https://developer.github.com/webhooks/event-payloads/#pull_request

@primetheus
Copy link
Contributor

@rrotaru thanks for opening this up! I'll have it tested by end of day 🙇🏽

Copy link
Contributor

@primetheus primetheus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ✨

@primetheus primetheus merged commit d504036 into main Sep 9, 2020
@primetheus primetheus deleted the fix-check-reruns branch September 9, 2020 17:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants