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

Commit

Permalink
Add one-time rebase command feature, close #41
Browse files Browse the repository at this point in the history
  • Loading branch information
tibdex committed Mar 31, 2019
1 parent 3aebaa9 commit 22747ec
Show file tree
Hide file tree
Showing 7 changed files with 2,240 additions and 2,099 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ It integrates especially well in repositories with branch protection set up to e
3. :label: When you're ready to hand over a pull request to Autorebase, simply [add the `autorebase` label to it](https://help.github.com/articles/creating-a-label/).
4. :sparkles: That's it! Pull requests with the `autorebase` label will then be rebased when their base branch moved forward ([`mergeable_state === "behind"`](https://developer.github.com/v4/enum/mergestatestatus/#behind)) and "rebased and merged" once all the branch protections are respected ([`mergeable_state === "clean"`](https://developer.github.com/v4/enum/mergestatestatus/#clean)).

## One-time `/rebase` command

Autorebase also supports one-time rebase commands: a collaborator with [write permssion](https://developer.github.com/v3/repos/collaborators/#review-a-users-permission-level) on a repository can post a `/rebase` comment on a pull request to rebase it once.

_Note_: This feature is a convenient way to easily integrate upstream changes such as CI config edits or bug-fixes but it shouldn't be abused as rebasing rewrites the Git history and thus makes collaborating on a pull request harder. See [this discussion](https://github.com/tibdex/autorebase/issues/41) for more details.

## Demo

### Rebasing a pull request with out-of-date status checks
Expand Down Expand Up @@ -55,6 +61,7 @@ Autorebase relies on [`github-rebase`](https://www.npmjs.com/package/github-reba

### Webhooks

- **Issue Comment**: to detect one-time `/rebase` commands.
- **Pull request**: to detect when the `autorebase` label is added/removed and when a pull request is closed.
Indeed, closing a pull request by merging its changes on its base branch may require rebasing other pull requests based on the same branch since they would now be outdated.

Expand Down
34 changes: 17 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,30 @@
"dependencies": {
"debug": "^4.1.1",
"github-rebase": "^1.0.0",
"probot-serverless-now": "^1.0.1",
"probot-serverless-now": "^2.0.0",
"promise-retry": "^1.1.1",
"shared-github-internals": "^1.0.0"
},
"description": "GitHub App to automatically rebase and merge pull requests",
"devDependencies": {
"@octokit/app": "^2.1.0",
"@octokit/rest": "^16.8.0",
"@types/debug": "^0.0.31",
"@types/jest": "^23.3.13",
"@types/node": "^10.12.18",
"@octokit/app": "^2.2.2",
"@octokit/rest": "^16.22.0",
"@types/debug": "^4.1.3",
"@types/jest": "^24.0.11",
"@types/node": "^11.12.2",
"@types/promise-retry": "^1.1.3",
"envalid": "^4.1.4",
"envalid": "^4.2.2",
"is-base64": "^0.1.0",
"jest": "^23.6.0",
"jest-circus": "^23.6.0",
"jest-junit": "^6.0.1",
"prettier": "^1.15.3",
"probot": "^8.0.0-beta.1",
"smee-client": "^1.0.2",
"ts-jest": "^23.10.5",
"tslint": "^5.12.1",
"tslint-config-prettier": "^1.17.0",
"typescript": "^3.2.4"
"jest": "^24.5.0",
"jest-circus": "^24.5.0",
"jest-junit": "^6.3.0",
"prettier": "^1.16.4",
"probot": "^9.0.2",
"smee-client": "^1.1.0",
"ts-jest": "^24.0.1",
"tslint": "^5.14.0",
"tslint-config-prettier": "^1.18.0",
"typescript": "^3.4.1"
},
"engines": {
"node": ">= 8.10.0"
Expand Down
Loading

0 comments on commit 22747ec

Please sign in to comment.