{"id":27123040,"url":"https://github.com/chrisledet/rebasebot","last_synced_at":"2025-04-07T12:34:28.776Z","repository":{"id":57553911,"uuid":"46902874","full_name":"chrisledet/rebasebot","owner":"chrisledet","description":"A GitHub bot that rebases your branches","archived":false,"fork":false,"pushed_at":"2017-01-26T05:17:32.000Z","size":61,"stargazers_count":45,"open_issues_count":0,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-06-20T02:35:32.982Z","etag":null,"topics":["bot","git","github-bot","rebases","webhook"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chrisledet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-26T03:55:34.000Z","updated_at":"2024-01-29T18:41:01.000Z","dependencies_parsed_at":"2022-09-26T18:41:32.988Z","dependency_job_id":null,"html_url":"https://github.com/chrisledet/rebasebot","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/chrisledet%2Frebasebot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisledet%2Frebasebot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisledet%2Frebasebot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisledet%2Frebasebot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chrisledet","download_url":"https://codeload.github.com/chrisledet/rebasebot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247654073,"owners_count":20973953,"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":["bot","git","github-bot","rebases","webhook"],"created_at":"2025-04-07T12:34:27.341Z","updated_at":"2025-04-07T12:34:28.748Z","avatar_url":"https://github.com/chrisledet.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rebasebot [![Circle CI](https://circleci.com/gh/chrisledet/rebasebot.svg?style=svg)](https://circleci.com/gh/chrisledet/rebasebot)\n\nA GitHub bot that rebases your pull request branches when you ask\n\n## How it works\n\n1. Make a dedicated GitHub account for the bot\n2. Grant the GitHub account read and write access to your repositories\n3. [Setup](#setup) the bot on your own server\n4. Type a comment \"**@{github bot username} rebase**\" in a pull request\n5. The bot will then kick off a rebase and push (if rebase successful) to your repository\n6. You can then delete the comment (in step 4) if you want to, including the rebase comment from the bot.\n\n## Dependencies\n\n* Dedicated host (e.g. EC2, Digital Ocean, Rackspace)\n* Go 1.5\n* Git\n* Dedicated GitHub account\n\n## Setup\n\n### Download\n\n```shell\n$ go get github.com/chrisledet/rebasebot\n```\n\n### Build\n\n```shell\n$ cd $GOPATH/src/github.com/chrisledet/rebasebot\n$ go build\n```\n\n### Install\n\nMake sure `$GOPATH/bin` is located in your `$PATH`\n\n```shell\n$ go install\n```\n\n### Configuration\n\nHere are the environment variables rebasebot uses:\n\n* `GITHUB_USERNAME`: GitHub username for bot. Required.\n* `GITHUB_PASSWORD`: GitHub password for bot. Required.\n* `PORT`: HTTP server port for the bot. Required.\n* `TMPDIR`: A path to a writable directory. All local copies will live here. Defaults to OS tmp. **Strongly recommended**.\n* `SECRET`: A token used to verify web hook requests from GitHub. **Strongly recommended**.\n\nThe `GITHUB_*` are needed so the bot can post activity updates to GitHub as well as push to accessible Git repositories. Using your personal credentials is **not recommended**.\n\n### Run\n\n```shell\n$ $GOPATH/bin/rebasebot\n```\n\n### Add GitHub Webhook\n\nThis is a required step to complete the setup.\n\n1. Go into your GitHub repository's Webhooks and services page\n2. Add webhook\n  1. Enter `http://\u003cyour host\u003e/rebase` in the \"Payload URL\" field\n  2. Content type should be set to \"application/json\"\n  3. Generate a secret token and enter it in \"Secret\" field\n  4. Only send \"Issue comment\" events. All other ones will be ignored.\n3. GitHub should succesfully ping the service and receive a HTTP 200 OK\n\n## Resources\n\n* GitHub guide for [securing your webhooks](https://developer.github.com/webhooks/securing/)\n\n* Generate secret token with Ruby\n\n  ```shell\n  $ ruby -rsecurerandom -e 'puts SecureRandom.hex(20)'\n  ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrisledet%2Frebasebot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchrisledet%2Frebasebot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrisledet%2Frebasebot/lists"}