Skip to content
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.

Timing could lead to unresponsive bot #5

Open
hectorsector opened this issue Jan 13, 2020 · 1 comment
Open

Timing could lead to unresponsive bot #5

hectorsector opened this issue Jan 13, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@hectorsector
Copy link
Member

Suppose the following series of steps:

  1. Learner open the first PR with the wrong title
  2. Before the learner can fix it, the check_suite.completed event comes through (which should trigger the following step, but LL doesn't know we're there yet)
  3. Learner fixes the PR title
  4. LL waits for the check_suite.completed event that'll never come through.

I'm not sure the best way to handle this edge case, but it's also present in our other Actions and Apps courses.

@mattdavis0351
Copy link
Contributor

maybe we abandon verifying things with check_suite.completed. In cases like this we may be able to use the pull request name from within the check_suite event. Take a look at the object below, you'll see the PR name.

"check_suite": {
    "id": 118578147,
    "node_id": "MDEwOkNoZWNrU3VpdGUxMTg1NzgxNDc=",
    "head_branch": "changes",
    "head_sha": "ec26c3e57ca3a959ca5aad62de7213c562f8c821",
    "status": "completed",
    "conclusion": "success",
    "url": "https://api.github.com/repos/Codertocat/Hello-World/check-suites/118578147",
    "before": "6113728f27ae82c7b1a177c8d03f9e96e0adf246",
    "after": "ec26c3e57ca3a959ca5aad62de7213c562f8c821",
    "pull_requests": [
      {
        "url": "https://api.github.com/repos/Codertocat/Hello-World/pulls/2",
        "id": 279147437,
        "number": 2,
        "head": {
          "ref": "changes",
          "sha": "ec26c3e57ca3a959ca5aad62de7213c562f8c821",
          "repo": {
            "id": 186853002,
            "url": "https://api.github.com/repos/Codertocat/Hello-World",
            "name": "Hello-World"
          }

Drilling down deep enough to get the name may pose a challenge for what we can do with Learning Lab though.

@hectorsector hectorsector added the bug Something isn't working label Jan 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants