Git Product home page Git Product logo

highfive's Introduction

Highfive

GitHub hooks to provide an encouraging atmosphere for new contributors.

Docs for the highfive instance for servo/servo repository live on the Servo wiki.

Design

Highfive is built as a modular, loosely-coupled set of handlers for Github API events. Each time an API event is processed, each handler is given the opportunity to respond to it, either by making direct API calls (such as manipulating PR labels) or using cross-handler features such as logging a warning (which are aggregated at the end and posted as a single comment).

Testing

Per-handler tests can be run using python test.py. These consist of a set of JSON documents collected from the tests/ subdirectory of each handler, using the following format:

{
  "initial": {
    // Initial state of the PR before any handlers process the payload.
    "labels": [],
    "diff": "",
    "new_contributor": false,
    "assignee": null
  },
  "expected": {
    // Expected state of the PR after all the handlers process the following payload.
    // Only fields in this object will be checked. Example fields are shown below.
    "comments": 5,
    "labels": ["S-awaiting-review"],
    "assignee": "jdm"
  },
  "payload": {
    // Github API event payload in JSON format.
  }
}

Each test runs with a mock Github API provider, so no account information or network connection is required to run the test suite.

Enabling a repo

Visit the repo's webhook settings page at https://github.com/org/repo/settings/hooks.

Create a new webhook, pointing at your highfive instance's location:

Payload URL: http://99.88.777.666/highfive/newpr.py Content type: application/x-www-form-urlencoded Leave the 'secret' field blank. Let me select individual events: Issue Comment, Pull Request, Status Check the box by 'Active'

Add the bot's github account as a Collaborator to the repo with Write access. If automatically assigning a reviewer is desired for the repo, add a new section to the highfive instance's collaborators.ini with the list of desired reviewers:

[user/repo]
reviewer_name =
another_reviewer_name =

Configuring a Highfive

Copy config.sample to config. Add the username of the account that will be commenting as highfive. When logged into that account, visit https://github.com/settings/tokens and create a token with the public_repo permission.

Add that access token's value to the token field of the config.

highfive's People

Contributors

aneeshusa avatar atbrakhi avatar avadacatavra avatar canova avatar cbrewster avatar darkspirit avatar dexterhaslem avatar emilio avatar fitzgen avatar frewsxcv avatar g-k avatar jdm avatar jgraham avatar kichjang avatar larsbergstrom avatar magni- avatar mark-simulacrum avatar numbermumbler avatar paulrouget avatar pythonnut avatar rillian avatar s-moffett avatar saurvs avatar simonsapin avatar sriharivignesh avatar tbu- avatar torbjorntorbjorn avatar wafflespeanut avatar yoongkang avatar zwn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

highfive's Issues

Check for typos in ini files

Specifically, it's easy to write disable: whatever instead of the correct disabled: whatever. Also, we could check for an issue number or URL in the disabling message.

Assignee in initial comment isn't recognized

{
  "action": "opened",
  "number": 7132,
  "pull_request": {
    "url": "https://api.github.com/repos/servo/servo/pulls/7132",
    "id": 42039555,
    "html_url": "https://github.com/servo/servo/pull/7132",
    "diff_url": "https://github.com/servo/servo/pull/7132.diff",
    "patch_url": "https://github.com/servo/servo/pull/7132.patch",
    "issue_url": "https://api.github.com/repos/servo/servo/issues/7132",
    "number": 7132,
    "state": "open",
    "locked": false,
    "title": "Document the use and meaning of the devtools control messages. Fixes …",
    "user": {
      "login": "jdm",
      "id": 27658,
      "avatar_url": "https://avatars.githubusercontent.com/u/27658?v=3",
      "gravatar_id": "",
      "url": "https://api.github.com/users/jdm",
      "html_url": "https://github.com/jdm",
      "followers_url": "https://api.github.com/users/jdm/followers",
      "following_url": "https://api.github.com/users/jdm/following{/other_user}",
      "gists_url": "https://api.github.com/users/jdm/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/jdm/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/jdm/subscriptions",
      "organizations_url": "https://api.github.com/users/jdm/orgs",
      "repos_url": "https://api.github.com/users/jdm/repos",
      "events_url": "https://api.github.com/users/jdm/events{/privacy}",
      "received_events_url": "https://api.github.com/users/jdm/received_events",
      "type": "User",
      "site_admin": false
    },
    "body": "…#6922.\r\n\r\nr? @Ms2ger ",
    "created_at": "2015-08-10T16:35:54Z",
    "updated_at": "2015-08-10T16:35:54Z",
    "closed_at": null,
    "merged_at": null,
    "merge_commit_sha": null,
    "assignee": null,
    "milestone": null,
    "commits_url": "https://api.github.com/repos/servo/servo/pulls/7132/commits",
    "review_comments_url": "https://api.github.com/repos/servo/servo/pulls/7132/comments",
    "review_comment_url": "https://api.github.com/repos/servo/servo/pulls/comments{/number}",
    "comments_url": "https://api.github.com/repos/servo/servo/issues/7132/comments",
    "statuses_url": "https://api.github.com/repos/servo/servo/statuses/5146a26a5e985447c8c5131e50ceb455d4331bcd",
    "head": {
      "label": "jdm:docenum",
      "ref": "docenum",
      "sha": "5146a26a5e985447c8c5131e50ceb455d4331bcd",
      "user": {
        "login": "jdm",
        "id": 27658,
        "avatar_url": "https://avatars.githubusercontent.com/u/27658?v=3",
        "gravatar_id": "",
        "url": "https://api.github.com/users/jdm",
        "html_url": "https://github.com/jdm",
        "followers_url": "https://api.github.com/users/jdm/followers",
        "following_url": "https://api.github.com/users/jdm/following{/other_user}",
        "gists_url": "https://api.github.com/users/jdm/gists{/gist_id}",
        "starred_url": "https://api.github.com/users/jdm/starred{/owner}{/repo}",
        "subscriptions_url": "https://api.github.com/users/jdm/subscriptions",
        "organizations_url": "https://api.github.com/users/jdm/orgs",
        "repos_url": "https://api.github.com/users/jdm/repos",
        "events_url": "https://api.github.com/users/jdm/events{/privacy}",
        "received_events_url": "https://api.github.com/users/jdm/received_events",
        "type": "User",
        "site_admin": false
      },
      "repo": {
        "id": 4872339,
        "name": "servo",
        "full_name": "jdm/servo",
        "owner": {
          "login": "jdm",
          "id": 27658,
          "avatar_url": "https://avatars.githubusercontent.com/u/27658?v=3",
          "gravatar_id": "",
          "url": "https://api.github.com/users/jdm",
          "html_url": "https://github.com/jdm",
          "followers_url": "https://api.github.com/users/jdm/followers",
          "following_url": "https://api.github.com/users/jdm/following{/other_user}",
          "gists_url": "https://api.github.com/users/jdm/gists{/gist_id}",
          "starred_url": "https://api.github.com/users/jdm/starred{/owner}{/repo}",
          "subscriptions_url": "https://api.github.com/users/jdm/subscriptions",
          "organizations_url": "https://api.github.com/users/jdm/orgs",
          "repos_url": "https://api.github.com/users/jdm/repos",
          "events_url": "https://api.github.com/users/jdm/events{/privacy}",
          "received_events_url": "https://api.github.com/users/jdm/received_events",
          "type": "User",
          "site_admin": false
        },
        "private": false,
        "html_url": "https://github.com/jdm/servo",
        "description": "The Servo Browser Engine",
        "fork": true,
        "url": "https://api.github.com/repos/jdm/servo",
        "forks_url": "https://api.github.com/repos/jdm/servo/forks",
        "keys_url": "https://api.github.com/repos/jdm/servo/keys{/key_id}",
        "collaborators_url": "https://api.github.com/repos/jdm/servo/collaborators{/collaborator}",
        "teams_url": "https://api.github.com/repos/jdm/servo/teams",
        "hooks_url": "https://api.github.com/repos/jdm/servo/hooks",
        "issue_events_url": "https://api.github.com/repos/jdm/servo/issues/events{/number}",
        "events_url": "https://api.github.com/repos/jdm/servo/events",
        "assignees_url": "https://api.github.com/repos/jdm/servo/assignees{/user}",
        "branches_url": "https://api.github.com/repos/jdm/servo/branches{/branch}",
        "tags_url": "https://api.github.com/repos/jdm/servo/tags",
        "blobs_url": "https://api.github.com/repos/jdm/servo/git/blobs{/sha}",
        "git_tags_url": "https://api.github.com/repos/jdm/servo/git/tags{/sha}",
        "git_refs_url": "https://api.github.com/repos/jdm/servo/git/refs{/sha}",
        "trees_url": "https://api.github.com/repos/jdm/servo/git/trees{/sha}",
        "statuses_url": "https://api.github.com/repos/jdm/servo/statuses/{sha}",
        "languages_url": "https://api.github.com/repos/jdm/servo/languages",
        "stargazers_url": "https://api.github.com/repos/jdm/servo/stargazers",
        "contributors_url": "https://api.github.com/repos/jdm/servo/contributors",
        "subscribers_url": "https://api.github.com/repos/jdm/servo/subscribers",
        "subscription_url": "https://api.github.com/repos/jdm/servo/subscription",
        "commits_url": "https://api.github.com/repos/jdm/servo/commits{/sha}",
        "git_commits_url": "https://api.github.com/repos/jdm/servo/git/commits{/sha}",
        "comments_url": "https://api.github.com/repos/jdm/servo/comments{/number}",
        "issue_comment_url": "https://api.github.com/repos/jdm/servo/issues/comments{/number}",
        "contents_url": "https://api.github.com/repos/jdm/servo/contents/{+path}",
        "compare_url": "https://api.github.com/repos/jdm/servo/compare/{base}...{head}",
        "merges_url": "https://api.github.com/repos/jdm/servo/merges",
        "archive_url": "https://api.github.com/repos/jdm/servo/{archive_format}{/ref}",
        "downloads_url": "https://api.github.com/repos/jdm/servo/downloads",
        "issues_url": "https://api.github.com/repos/jdm/servo/issues{/number}",
        "pulls_url": "https://api.github.com/repos/jdm/servo/pulls{/number}",
        "milestones_url": "https://api.github.com/repos/jdm/servo/milestones{/number}",
        "notifications_url": "https://api.github.com/repos/jdm/servo/notifications{?since,all,participating}",
        "labels_url": "https://api.github.com/repos/jdm/servo/labels{/name}",
        "releases_url": "https://api.github.com/repos/jdm/servo/releases{/id}",
        "created_at": "2012-07-03T13:10:58Z",
        "updated_at": "2014-07-22T08:38:23Z",
        "pushed_at": "2015-08-10T16:35:43Z",
        "git_url": "git://github.com/jdm/servo.git",
        "ssh_url": "[email protected]:jdm/servo.git",
        "clone_url": "https://github.com/jdm/servo.git",
        "svn_url": "https://github.com/jdm/servo",
        "homepage": "",
        "size": 120547,
        "stargazers_count": 1,
        "watchers_count": 1,
        "language": "Rust",
        "has_issues": false,
        "has_downloads": true,
        "has_wiki": true,
        "has_pages": false,
        "forks_count": 0,
        "mirror_url": null,
        "open_issues_count": 0,
        "forks": 0,
        "open_issues": 0,
        "watchers": 1,
        "default_branch": "master"
      }
    },
    "base": {
      "label": "servo:master",
      "ref": "master",
      "sha": "a91c366c06be4bf1765dc8be1c019146d5da3b48",
      "user": {
        "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
      },
      "repo": {
        "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}",
        "created_at": "2012-02-08T19:07:25Z",
        "updated_at": "2015-08-10T11:03:31Z",
        "pushed_at": "2015-08-10T15:53:38Z",
        "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": "",
        "size": 205307,
        "stargazers_count": 4588,
        "watchers_count": 4588,
        "language": "Rust",
        "has_issues": true,
        "has_downloads": true,
        "has_wiki": true,
        "has_pages": false,
        "forks_count": 721,
        "mirror_url": null,
        "open_issues_count": 1057,
        "forks": 721,
        "open_issues": 1057,
        "watchers": 4588,
        "default_branch": "master"
      }
    },
    "_links": {
      "self": {
        "href": "https://api.github.com/repos/servo/servo/pulls/7132"
      },
      "html": {
        "href": "https://github.com/servo/servo/pull/7132"
      },
      "issue": {
        "href": "https://api.github.com/repos/servo/servo/issues/7132"
      },
      "comments": {
        "href": "https://api.github.com/repos/servo/servo/issues/7132/comments"
      },
      "review_comments": {
        "href": "https://api.github.com/repos/servo/servo/pulls/7132/comments"
      },
      "review_comment": {
        "href": "https://api.github.com/repos/servo/servo/pulls/comments{/number}"
      },
      "commits": {
        "href": "https://api.github.com/repos/servo/servo/pulls/7132/commits"
      },
      "statuses": {
        "href": "https://api.github.com/repos/servo/servo/statuses/5146a26a5e985447c8c5131e50ceb455d4331bcd"
      }
    },
    "merged": false,
    "mergeable": null,
    "mergeable_state": "unknown",
    "merged_by": null,
    "comments": 0,
    "review_comments": 0,
    "commits": 1,
    "additions": 13,
    "deletions": 0,
    "changed_files": 1
  },
  "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}",
    "created_at": "2012-02-08T19:07:25Z",
    "updated_at": "2015-08-10T11:03:31Z",
    "pushed_at": "2015-08-10T15:53:38Z",
    "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": "",
    "size": 205307,
    "stargazers_count": 4588,
    "watchers_count": 4588,
    "language": "Rust",
    "has_issues": true,
    "has_downloads": true,
    "has_wiki": true,
    "has_pages": false,
    "forks_count": 721,
    "mirror_url": null,
    "open_issues_count": 1057,
    "forks": 721,
    "open_issues": 1057,
    "watchers": 4588,
    "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",
    "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": "jdm",
    "id": 27658,
    "avatar_url": "https://avatars.githubusercontent.com/u/27658?v=3",
    "gravatar_id": "",
    "url": "https://api.github.com/users/jdm",
    "html_url": "https://github.com/jdm",
    "followers_url": "https://api.github.com/users/jdm/followers",
    "following_url": "https://api.github.com/users/jdm/following{/other_user}",
    "gists_url": "https://api.github.com/users/jdm/gists{/gist_id}",
    "starred_url": "https://api.github.com/users/jdm/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.github.com/users/jdm/subscriptions",
    "organizations_url": "https://api.github.com/users/jdm/orgs",
    "repos_url": "https://api.github.com/users/jdm/repos",
    "events_url": "https://api.github.com/users/jdm/events{/privacy}",
    "received_events_url": "https://api.github.com/users/jdm/received_events",
    "type": "User",
    "site_admin": false
  }
}

Check for the presence of tests in more PRs

We currently warn about layout changes that don't include tests. I think we should extend this to every PR that touches components/script, components/gfx, components/style, and components/net, since those are the most likely to contain testable changes.

Code: handlers/missing_test/__init__.py

Support watchers for github issue labels

For people who don't want to watch all the Servo issue activity but still care about activity that goes on in particular labels, highfive could support automatically notifying them when a label is added to an issue. This would be implemented very similarly to the file watching handler but using the "labeled" action, which would need to be added to eventhandler.py.

Help people without permissions claim issues

Servo has the wonderful problem of new contributors stepping on each others' toes for introductory bugs. To reduce this, it would be nice to have Highfive note that an issue is claimed when someone claims it. I can think of two ways to implement an "assign to newbie":

Either way, I'd propose a syntax like "@highfive assign @username" (usable by people with r+ perms on the repo to assign to arbitrary newbies) plus "@highfive assign me" for someone who has no perms yet to claim the ticket through whichever mechanic we decide.

It could also be nice to have the issue-claiming syntax include a timeout, like "@highfive assign me 1week", and have highfive unassign the issue if it ever sits for longer than the specified timeout with no new comments.

@jdm, thoughts?

Overall clone method call stats

It doesn't have to be good or bad, just a quick glance of "oh, this PR sure add a lot of new clone calls." Look at the number of .clone() strings removed, and subtract that from the number of similar strings added.

Warn on adding new files to tests/ref

We're trying to remove this test harness, but there are a couple tests still running in it. This warning requires looking at the lines of the diff and looking for a before path of /dev/null and an after path that includes tests/ref. This requires creating a new handler in handlers/.

Homu is broken on this repository

#86 finished testing on travis but homu didn't do anything with it. From IRC:

18:54 <aneeshusa> jdm: I checked the homu logs and there's an authentication failure for the highfive repo
18:55 <aneeshusa> jdm: it says to check for a wrong travis token
18:57 <aneeshusa> jdm: Checking the config though it seems to have the same Travis token as the rest of the Servo org repos, hmm
18:58 <aneeshusa> It might be that token doesn't have sufficient permissions attached to it, not sure

cc @edunham

Warn on modifying any files in tests/wpt/css-tests/

The files in that directory are synced from upstream occasionally, and that process will overwrite any modifications since the last sync. We should warn about this. This should be very similar to the handler added in #54.

Say when a PR adds new dependencies

As discussed in this week's Servo meeting, it would be great if highfive added a comment when new dependencies are added. To go above and beyond on a language-specific basis, it would be great to look up each dependency's license in its metadata and note that in the comment as well.

Asignee vs “you should hear from”

highfive randomly assigns new PRs to a reviewer. If the PR is by a new contributor, highfive will separately pick a reviewer randomly and make a message like

Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from […] (or someone else) soon.

If I’m picked for the latter but not the former, it’s not clear to me if I should do anything or leave it to the assignee to deal with that PR. Perhaps highfive should always pick the same person for both?

Add TestBinding.webidl and testbinding.rs to the test check

Actually if you modify script code you can also add tests to these files:

  • components/script/dom/testbinding.rs
  • components/script/dom/webidls/TestBinding.webidl

Right now highfive warns you even though you've added tests there (see servo/servo#9304) for example.

Should be easy to check if these files are modified too to prevent the false warning.

Support file path exclusions in watcher handler

#46 added file path watching, but we should support exclusions as well. This list would be checked after finding a match in handlers/watchers/__ini__.py and it would be ignored if there's a matching exclusion found. I propose that any path for a particular user that starts with a - should be considered an exclusion (jdm = foo/blah -foo/blah/bar)

Docs?

Hi! I was wondering if this is the python script that emailed me with all my contributing information when I made a PR to a rust project. If so I'd love to know how it works!

Highlight some easy style nits

It should be easy to find additions that include things like extraneous parentheses, missing spaces around operators, missing spaces before braces, etc. The bot could probably comment on them, reducing the work required for the reviewer a bit.

Check for common problems when adding the "E-easy"/"E-less easy" labels

The first time the label is added, we should check for the presence of common issues. I need to think about what this involves, but off the top of my head:

  • lack of filenames (a/b.rs), types/modules (a::b)
  • lack of instructions involving mach (ie. ./mach test-wpt, ./mach build-cef, ./mach test-tidy)

We could leave a comment highlighting the missing pieces and linking to a document with best practices for filing issues intended for non-core contributors.

Automatically retry when tidy fails

Sometimes PRs get r+'d without Travis CI finishing its build, which causes homu to fail when the PR fails tidy. It may be beneficial when the contributor pushes a new commit to the PR after homu fails, highfive would automatically r+ again and start the homu build.

Warn if PR includes changes to csswg tests

We can't upstream the CSSWG tests automatically from servo/servo, so all changes need to be made upstream. We should check for this fact (tests/wpt/css-tests/), along with changes to tests/wpt/harness/wptrunner/ and anything else that belongs upstream.

Add a watchlist to notify users when a PR touches a particular file or directory

Github doesn't make it easy for individual users to track changes to particular files that are of interest. We can fix that! I propose creating a new handler with an on_new_pr listener that:

  • reads a configuration file in the following format:
[directory/subdirectory/file.html]
watchers = jdm highfive
[directory/subdirectory]
watchers = bholley
[another_directory]
watchers = jdm

(ConfigParser recommended)

  • for each file in the PR's diff, compare the path of the changed file against the list of files and directories obtained from the configuration file
  • for each path and file that is a match, add the watchers to a list
  • after all paths and files are checked, post a comment that includes "@[watcher]" to notify them that the PR contains changes to files/directories that they are watching

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.