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

Add the S-needs-code-changes if travis build fails #28

Open
jdm opened this issue Oct 8, 2015 · 18 comments
Open

Add the S-needs-code-changes if travis build fails #28

jdm opened this issue Oct 8, 2015 · 18 comments

Comments

@jdm
Copy link
Member

jdm commented Oct 8, 2015

No description provided.

@edunham
Copy link
Contributor

edunham commented Nov 16, 2015

Build status seems to be available in the API result as "state":"failure", see #16 for a couple examples

@mylainos
Copy link
Contributor

I would like to work on this one but I'm not sure I should add code in homu_status/__init__.py or in status_update/__init__.py.

@edunham
Copy link
Contributor

edunham commented Nov 30, 2015

@mylainos Welcome! I believe it should be in status_updates/__init.py__, but let's confirm with @jdm since he architected the change to event handlers.

@jdm
Copy link
Member Author

jdm commented Dec 1, 2015

This belongs in status_updates, but it will need to be a new hook defined in eventhandler.py and invoked from newpr.py when the new action is encountered.

@jdm
Copy link
Member Author

jdm commented Dec 1, 2015

I suggest on_build_status.

@KiChjang
Copy link
Contributor

@mylainos do you need any help with this?

@mylainos
Copy link
Contributor

If you want , you can work on this one.

@mylainos
Copy link
Contributor

mylainos commented Apr 3, 2016

I would like to finish this one :)

@jdm
Copy link
Member Author

jdm commented Apr 3, 2016

Go for it :)

@mylainos
Copy link
Contributor

mylainos commented Apr 4, 2016

For get the build status we need to use StatusEvent. But I don't find where the issue info is, and we need it to change the labels.

@jdm
Copy link
Member Author

jdm commented Apr 4, 2016

Here's an example, since Servo already receives status events:

{
  "id": 510996575,
  "sha": "650aae0ca9be912021c0d21e30e4cedf67135a78",
  "name": "servo/servo",
  "target_url": "https://travis-ci.org/servo/servo/builds/120670455",
  "context": "continuous-integration/travis-ci/pr",
  "description": "The Travis CI build failed",
  "state": "failure",
  "commit": {
    "sha": "650aae0ca9be912021c0d21e30e4cedf67135a78",
    "commit": {
      "author": {
        "name": "Alan Jeffrey",
        "email": "[email protected]",
        "date": "2016-04-04T16:47:29Z"
      },
      "committer": {
        "name": "Alan Jeffrey",
        "email": "[email protected]",
        "date": "2016-04-04T16:47:29Z"
      },
      "message": "Responding to reviewer comments.",
      "tree": {
        "sha": "c74649f3b0d52b932a19cfb3ce47415fb6439680",
        "url": "https://api.github.com/repos/servo/servo/git/trees/c74649f3b0d52b932a19cfb3ce47415fb6439680"
      },
      "url": "https://api.github.com/repos/servo/servo/git/commits/650aae0ca9be912021c0d21e30e4cedf67135a78",
      "comment_count": 0
    },
    "url": "https://api.github.com/repos/servo/servo/commits/650aae0ca9be912021c0d21e30e4cedf67135a78",
    "html_url": "https://github.com/servo/servo/commit/650aae0ca9be912021c0d21e30e4cedf67135a78",
    "comments_url": "https://api.github.com/repos/servo/servo/commits/650aae0ca9be912021c0d21e30e4cedf67135a78/comments",
    "author": {
      "login": "asajeffrey",
      "id": 403333,
      "avatar_url": "https://avatars.githubusercontent.com/u/403333?v=3",
      "gravatar_id": "",
      "url": "https://api.github.com/users/asajeffrey",
      "html_url": "https://github.com/asajeffrey",
      "followers_url": "https://api.github.com/users/asajeffrey/followers",
      "following_url": "https://api.github.com/users/asajeffrey/following{/other_user}",
      "gists_url": "https://api.github.com/users/asajeffrey/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/asajeffrey/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/asajeffrey/subscriptions",
      "organizations_url": "https://api.github.com/users/asajeffrey/orgs",
      "repos_url": "https://api.github.com/users/asajeffrey/repos",
      "events_url": "https://api.github.com/users/asajeffrey/events{/privacy}",
      "received_events_url": "https://api.github.com/users/asajeffrey/received_events",
      "type": "User",
      "site_admin": false
    },
    "committer": {
      "login": "asajeffrey",
      "id": 403333,
      "avatar_url": "https://avatars.githubusercontent.com/u/403333?v=3",
      "gravatar_id": "",
      "url": "https://api.github.com/users/asajeffrey",
      "html_url": "https://github.com/asajeffrey",
      "followers_url": "https://api.github.com/users/asajeffrey/followers",
      "following_url": "https://api.github.com/users/asajeffrey/following{/other_user}",
      "gists_url": "https://api.github.com/users/asajeffrey/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/asajeffrey/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/asajeffrey/subscriptions",
      "organizations_url": "https://api.github.com/users/asajeffrey/orgs",
      "repos_url": "https://api.github.com/users/asajeffrey/repos",
      "events_url": "https://api.github.com/users/asajeffrey/events{/privacy}",
      "received_events_url": "https://api.github.com/users/asajeffrey/received_events",
      "type": "User",
      "site_admin": false
    },
    "parents": [
      {
        "sha": "7f6cc24145dda4f056f70add7154fd3a416bb0d6",
        "url": "https://api.github.com/repos/servo/servo/commits/7f6cc24145dda4f056f70add7154fd3a416bb0d6",
        "html_url": "https://github.com/servo/servo/commit/7f6cc24145dda4f056f70add7154fd3a416bb0d6"
      }
    ]
  },
  "branches": [

  ],
  "created_at": "2016-04-04T17:06:05Z",
  "updated_at": "2016-04-04T17:06:05Z",
  "repository": {
    "id": 3390243,
    "name": "servo",
    "full_name": "servo/servo",
    "owner": {
      "login": "servo",
      "id": 2566135,
      "avatar_url": "https://avatars.githubusercontent.com/u/2566135?v=3",
      "gravatar_id": "",
      "url": "https://api.github.com/users/servo",
      "html_url": "https://github.com/servo",
      "followers_url": "https://api.github.com/users/servo/followers",
      "following_url": "https://api.github.com/users/servo/following{/other_user}",
      "gists_url": "https://api.github.com/users/servo/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/servo/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/servo/subscriptions",
      "organizations_url": "https://api.github.com/users/servo/orgs",
      "repos_url": "https://api.github.com/users/servo/repos",
      "events_url": "https://api.github.com/users/servo/events{/privacy}",
      "received_events_url": "https://api.github.com/users/servo/received_events",
      "type": "Organization",
      "site_admin": false
    },
    "private": false,
    "html_url": "https://github.com/servo/servo",
    "description": "The Servo Browser Engine",
    "fork": false,
    "url": "https://api.github.com/repos/servo/servo",
    "forks_url": "https://api.github.com/repos/servo/servo/forks",
    "keys_url": "https://api.github.com/repos/servo/servo/keys{/key_id}",
    "collaborators_url": "https://api.github.com/repos/servo/servo/collaborators{/collaborator}",
    "teams_url": "https://api.github.com/repos/servo/servo/teams",
    "hooks_url": "https://api.github.com/repos/servo/servo/hooks",
    "issue_events_url": "https://api.github.com/repos/servo/servo/issues/events{/number}",
    "events_url": "https://api.github.com/repos/servo/servo/events",
    "assignees_url": "https://api.github.com/repos/servo/servo/assignees{/user}",
    "branches_url": "https://api.github.com/repos/servo/servo/branches{/branch}",
    "tags_url": "https://api.github.com/repos/servo/servo/tags",
    "blobs_url": "https://api.github.com/repos/servo/servo/git/blobs{/sha}",
    "git_tags_url": "https://api.github.com/repos/servo/servo/git/tags{/sha}",
    "git_refs_url": "https://api.github.com/repos/servo/servo/git/refs{/sha}",
    "trees_url": "https://api.github.com/repos/servo/servo/git/trees{/sha}",
    "statuses_url": "https://api.github.com/repos/servo/servo/statuses/{sha}",
    "languages_url": "https://api.github.com/repos/servo/servo/languages",
    "stargazers_url": "https://api.github.com/repos/servo/servo/stargazers",
    "contributors_url": "https://api.github.com/repos/servo/servo/contributors",
    "subscribers_url": "https://api.github.com/repos/servo/servo/subscribers",
    "subscription_url": "https://api.github.com/repos/servo/servo/subscription",
    "commits_url": "https://api.github.com/repos/servo/servo/commits{/sha}",
    "git_commits_url": "https://api.github.com/repos/servo/servo/git/commits{/sha}",
    "comments_url": "https://api.github.com/repos/servo/servo/comments{/number}",
    "issue_comment_url": "https://api.github.com/repos/servo/servo/issues/comments{/number}",
    "contents_url": "https://api.github.com/repos/servo/servo/contents/{+path}",
    "compare_url": "https://api.github.com/repos/servo/servo/compare/{base}...{head}",
    "merges_url": "https://api.github.com/repos/servo/servo/merges",
    "archive_url": "https://api.github.com/repos/servo/servo/{archive_format}{/ref}",
    "downloads_url": "https://api.github.com/repos/servo/servo/downloads",
    "issues_url": "https://api.github.com/repos/servo/servo/issues{/number}",
    "pulls_url": "https://api.github.com/repos/servo/servo/pulls{/number}",
    "milestones_url": "https://api.github.com/repos/servo/servo/milestones{/number}",
    "notifications_url": "https://api.github.com/repos/servo/servo/notifications{?since,all,participating}",
    "labels_url": "https://api.github.com/repos/servo/servo/labels{/name}",
    "releases_url": "https://api.github.com/repos/servo/servo/releases{/id}",
    "deployments_url": "https://api.github.com/repos/servo/servo/deployments",
    "created_at": "2012-02-08T19:07:25Z",
    "updated_at": "2016-04-04T15:48:28Z",
    "pushed_at": "2016-04-04T17:04:27Z",
    "git_url": "git://github.com/servo/servo.git",
    "ssh_url": "[email protected]:servo/servo.git",
    "clone_url": "https://github.com/servo/servo.git",
    "svn_url": "https://github.com/servo/servo",
    "homepage": "https://servo.org/",
    "size": 214000,
    "stargazers_count": 6429,
    "watchers_count": 6429,
    "language": null,
    "has_issues": true,
    "has_downloads": true,
    "has_wiki": true,
    "has_pages": false,
    "forks_count": 1055,
    "mirror_url": null,
    "open_issues_count": 1417,
    "forks": 1055,
    "open_issues": 1417,
    "watchers": 6429,
    "default_branch": "master"
  },
  "organization": {
    "login": "servo",
    "id": 2566135,
    "url": "https://api.github.com/orgs/servo",
    "repos_url": "https://api.github.com/orgs/servo/repos",
    "events_url": "https://api.github.com/orgs/servo/events",
    "hooks_url": "https://api.github.com/orgs/servo/hooks",
    "issues_url": "https://api.github.com/orgs/servo/issues",
    "members_url": "https://api.github.com/orgs/servo/members{/member}",
    "public_members_url": "https://api.github.com/orgs/servo/public_members{/member}",
    "avatar_url": "https://avatars.githubusercontent.com/u/2566135?v=3",
    "description": null
  },
  "sender": {
    "login": "asajeffrey",
    "id": 403333,
    "avatar_url": "https://avatars.githubusercontent.com/u/403333?v=3",
    "gravatar_id": "",
    "url": "https://api.github.com/users/asajeffrey",
    "html_url": "https://github.com/asajeffrey",
    "followers_url": "https://api.github.com/users/asajeffrey/followers",
    "following_url": "https://api.github.com/users/asajeffrey/following{/other_user}",
    "gists_url": "https://api.github.com/users/asajeffrey/gists{/gist_id}",
    "starred_url": "https://api.github.com/users/asajeffrey/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.github.com/users/asajeffrey/subscriptions",
    "organizations_url": "https://api.github.com/users/asajeffrey/orgs",
    "repos_url": "https://api.github.com/users/asajeffrey/repos",
    "events_url": "https://api.github.com/users/asajeffrey/events{/privacy}",
    "received_events_url": "https://api.github.com/users/asajeffrey/received_events",
    "type": "User",
    "site_admin": false
  }
}

@mylainos
Copy link
Contributor

mylainos commented Apr 4, 2016

There is no field where one can find the issue id.

@jdm
Copy link
Member Author

jdm commented Apr 4, 2016

That's a good point! Luckily #26 has code that addresses this issue. You'll need to access the TravisCI API, like https://github.com/servo/highfive/pull/26/files#diff-1ead63058bd39887ba2d4367b324ec4bR1 . In particular, see the use of get_pull_request_number.

@jdm
Copy link
Member Author

jdm commented Apr 20, 2016

@mylainos Are you still working on this?

@mylainos
Copy link
Contributor

mylainos commented Apr 21, 2016

Yes but I wait #26 because I can't access the id. If you want I will do a pull request but it won't work for now.

@jdm
Copy link
Member Author

jdm commented Apr 21, 2016

Oh, #26 isn't going anywhere. The original author has moved on, and it's very complicated to rebase in the new highfive architecture.

@jdm
Copy link
Member Author

jdm commented Apr 21, 2016

My suggestion was that you could steal the relevant code from #26.

@mylainos
Copy link
Contributor

Ok, thanks!

Mark-Simulacrum pushed a commit to Mark-Simulacrum/highfive that referenced this issue Sep 8, 2020
Warn when submodules are modified
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants