{"id":15030868,"url":"https://github.com/rust-lang/highfive","last_synced_at":"2025-10-04T01:31:04.990Z","repository":{"id":16274241,"uuid":"19022579","full_name":"rust-lang/highfive","owner":"rust-lang","description":"Github hooks to provide an encouraging atmosphere for new contributors","archived":true,"fork":false,"pushed_at":"2023-03-14T22:16:28.000Z","size":716,"stargazers_count":185,"open_issues_count":39,"forks_count":128,"subscribers_count":29,"default_branch":"master","last_synced_at":"2024-11-03T12:52:03.400Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rust-lang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-04-22T08:35:36.000Z","updated_at":"2024-07-29T05:05:31.000Z","dependencies_parsed_at":"2024-09-28T20:41:06.574Z","dependency_job_id":null,"html_url":"https://github.com/rust-lang/highfive","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-lang%2Fhighfive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-lang%2Fhighfive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-lang%2Fhighfive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-lang%2Fhighfive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rust-lang","download_url":"https://codeload.github.com/rust-lang/highfive/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235208940,"owners_count":18953003,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-24T20:14:25.652Z","updated_at":"2025-10-04T01:30:59.711Z","avatar_url":"https://github.com/rust-lang.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Highfive\n========\n\nThis repository is no longer running on rust-lang infrastructure; instead the\nrelevant code lives in [triagebot](https://github.com/rust-lang/triagebot).\nThis repository has been archived to retain it for the future.\n\n----\n\nGitHub hooks to provide an encouraging atmosphere for new\ncontributors. Highfive assigns pull requests to users based on rules\nin configuration files. You can see Highfive in action in several Rust\nrepositories. See the [rust-lang/rust pull\nrequests](https://github.com/rust-lang/rust/pulls), for example.\n\nThis project drives the [@rust-highfive][] bot and was originally a fork of\n[servo/highfive][], used by Servo and Servo's [@highfive][] bot.  For more\nhistory see the comments in [#35][].\n\n[@rust-highfive]: https://github.com/rust-highfive\n[servo/highfive]: https://github.com/servo/highfive\n[@highfive]: https://github.com/highfive\n[#35]: https://github.com/rust-lang-nursery/highfive/issues/35\n\n### Table of Contents\n\n1. [Installation](#installation)\n1. [Testing](#testing)\n1. [Adding a Project](#adding-a-project)\n1. [Enabling a Repository](#enabling-a-repository)\n1. [Local Development](#local-development)\n1. [License](#license)\n\nInstallation\n=======\n\nTo install `highfive`, you just need to execute the `setup.py` script or use\n`pip` directly. Both commands have to be executed from the directory where\n`setup.py` is located.\n\n    $ python setup.py install\n\nor\n\n    $ pip install . # the dot is important ;)\n\n\nTesting\n=======\n\nBefore running tests, make sure the test-requirements are installed by running the following command:\n\n    $ pip install -r test-requirements.txt\n\n\nOnce the dependencies are installed, you can run all tests by\nexecuting:\n\n    $ pytest\n\nTests are labeled as \"unit\", \"integration\", and \"hermetic\". All unit\ntests are hermetic, but only some integration tests are hermetic. A\nnon-hermetic test makes network requests. To run only hermetic tests\ndo:\n\n    $ pytest -m hermetic\n\nHermetic tests are run in PR builds. All tests are run in daily cron\nbuilds.\n\nAdding a Project\n================\n\nTo make rust-highfive interact with a new repo, add a configuration file in\n`highfive/configs`, with a filename of the form `reponame.json`. The file should look like:\n\n```\n{\n    \"groups\":{\n        \"all\": [\"@username\", \"@otheruser\"],\n        \"subteamname\": [\"@subteammember\", \"@username\"]\n    },\n    \"dirs\":{\n        \"dirname\":  [\"subteamname\", \"@anotheruser\"]\n    },\n    \"contributing\": \"http://project.tld/contributing_guide.html\",\n    \"expected_branch\": \"develop\",\n    \"mentions\": {\n        \"src/doc\": {\n            \"message\": \"Documentation was changed.\",\n            \"reviewers\": [\"@DocumentationReviewPerson\"]\n        },\n        \"test.rs\": {\n            \"message\": \"Some changes occurred in a test file.\",\n            \"reviewers\": [\"@TestReviewPerson\"]\n        }\n    },\n    \"new_pr_labels\": [\"S-waiting-for-review\"]\n}\n```\n\nThe `groups` section allows you to alias lists of usernames. You should\nspecify at least one user in the group \"all\". Other keys are optional.\n\nIn the `dirs` section, you map directories of the repository to users or\ngroups who're eligible to review PRs. This section can be left\nblank.\n\n`contributing` specifies the contribution guide link in the message which\nwelcomes new contributors to the repository. If `contributing` is not\npresent, [the contributing chapter of the rustc-dev-guide][rustcontrib]\nwill be linked instead.\n\nIf PRs should be filed against a branch other than `master`, specify the\ncorrect destination in the `expected_branch` field. If `expected_branch` is\nleft out, highfive will assume that PRs should be filed against `master`. \nThe bot posts a warning on any PR that targets an unexpected branch.\n\nThe `mentions` section is used by Highfive when new PRs are\ncreated. If a PR diff modifies files in the paths configured in the\n`mentions` section, a comment is made with the given message that\nmentions the specified users. Mentions paths have either one or two\nbehaviors.\n- Every path in a diff is checked whether it begins with a path in the\n  mentions list. If there is a match, the mention comment is made.\n- If a path in the diff ends with a mentions path ending in `.rs`, the\n  mention is a match, and a comment is made.\n\n`new_pr_labels` contains a list of labels to apply to each new PR. If it's left\nout or empty, no new labels will be applied.\n\nEnabling a Repository\n---------------\n\nOnce the PR updating the repository configuration has been merged, run the\n`update-webhooks.py` script at the root of this repository:\n\n```\n$ python3 update-webhooks.py\n```\n\nThe script requires the `GITHUB_TOKEN` environment variable to be set to a\nvalid GitHub API token, and it will make sure the configuration of all the\nrepositories you have admin access to is correct.\n\nLocal Development\n-----------------\n\nYou can run Highfive on your machine and configure a repository to use\nyour local instance. Here is one approach for running a local server:\n\n- Create a [virtualenv](https://virtualenv.pypa.io/en/stable/) to isolate the\n  Python environment from the rest of the system, and install highfive in it:\n  ```\n  $ virtualenv -p python2 env\n  $ env/bin/pip install -e .\n  ```\n- Run the highfive command to start a development server on port 8000:\n  ```\n  $ env/bin/highfive\n  ```\n- Your Highfive instance will need to be reachable from outside of your\n  machine. One way to do this is to use [ngrok](https://ngrok.com/) to get a\n  temporary domain name that proxies to your Highfive instance. Additionally,\n  you will be able to use ngrok's inspector to easily examine and replay the\n  requests.\n- Set up the webhook by following the instructions in [Enabling a\n  Repo](#enabling-a-repo), substituting your local Highfive IP address\n  or domain name and port number (if necessary).\n- Obtain an OAuth token. In the account you are creating the token in,\n  go to https://github.com/settings/tokens. Grant access to the repository scope.\n- Put the authorization information obtained in the previous step into a file\n  named `.env` in the top of the repository (i.e., the directory containing\n  this file). Here is a template of what it should look like:\n  ```\n  HIGHFIVE_GITHUB_TOKEN=your-token\n  ```\n  _Do not check in this file or commit your OAuth token to a\n  repository in any other way. It is a secret._\n\nHere are some details to be aware of:\n\n- For Highfive to know how to select reviewers for your repository,\n  you need a configuration file in\n  [highfive/configs](/highfive/configs).\n- Highfive ignores comments from the integration user near the top of\n  `new_commment` in [highfive/newpr.py](/highfive/newpr.py).\n\n[rustcontrib]: https://rustc-dev-guide.rust-lang.org/contributing.html\n\nDocker\n------\n\nAlternatively, you can build a Docker image that runs Highfive.\n\n```\n$ docker build -t highfive .\n```\n\nTo run a container, you must mount a config file. Assuming you are\nlaunching a container from a directory containing a config file, you\ncan do the following.\n\n```\n$ docker run -d --rm --name highfive -p 8000:80 -e HIGHFIVE_GITHUB_TOKEN=token -e HIGHFIVE_WEBHOOK_SECRET=secret highfive\n```\n\nAt this point, Highfive is accessible at http://localhost:8080.\n\nLicense\n=======\n\nHighfive is licensed under the terms of both the MIT License and the\nApache License (Version 2.0).\n\nSee [LICENSE-APACHE](LICENSE-APACHE) and [LICENSE-MIT](LICENSE-MIT) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frust-lang%2Fhighfive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frust-lang%2Fhighfive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frust-lang%2Fhighfive/lists"}