{"id":15647358,"url":"https://github.com/peter-evans/rebase","last_synced_at":"2025-04-14T13:11:37.882Z","repository":{"id":42693490,"uuid":"266732235","full_name":"peter-evans/rebase","owner":"peter-evans","description":"A GitHub action to rebase pull requests in a repository","archived":false,"fork":false,"pushed_at":"2024-02-05T08:04:51.000Z","size":3016,"stargazers_count":45,"open_issues_count":5,"forks_count":15,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-05-02T02:15:26.886Z","etag":null,"topics":["automation","github-action","rebase","workflow"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/peter-evans.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"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},"funding":{"github":"peter-evans"}},"created_at":"2020-05-25T09:01:13.000Z","updated_at":"2024-06-17T08:53:28.696Z","dependencies_parsed_at":"2023-01-11T17:22:14.717Z","dependency_job_id":"e8007776-7474-458d-b016-6faf256ae0a9","html_url":"https://github.com/peter-evans/rebase","commit_stats":{"total_commits":139,"total_committers":4,"mean_commits":34.75,"dds":0.3453237410071942,"last_synced_commit":"bf4703787b476e66aea9ec9fe24c993b38854804"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-evans%2Frebase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-evans%2Frebase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-evans%2Frebase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-evans%2Frebase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peter-evans","download_url":"https://codeload.github.com/peter-evans/rebase/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248886324,"owners_count":21177643,"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":["automation","github-action","rebase","workflow"],"created_at":"2024-10-03T12:18:53.180Z","updated_at":"2025-04-14T13:11:36.414Z","avatar_url":"https://github.com/peter-evans.png","language":"TypeScript","funding_links":["https://github.com/sponsors/peter-evans"],"categories":[],"sub_categories":[],"readme":"# Rebase\n[![CI](https://github.com/peter-evans/rebase/workflows/CI/badge.svg)](https://github.com/peter-evans/rebase/actions?query=workflow%3ACI)\n[![GitHub Marketplace](https://img.shields.io/badge/Marketplace-Rebase%20Pulls-blue.svg?colorA=24292e\u0026colorB=0366d6\u0026style=flat\u0026longCache=true\u0026logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAM6wAADOsB5dZE0gAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAERSURBVCiRhZG/SsMxFEZPfsVJ61jbxaF0cRQRcRJ9hlYn30IHN/+9iquDCOIsblIrOjqKgy5aKoJQj4O3EEtbPwhJbr6Te28CmdSKeqzeqr0YbfVIrTBKakvtOl5dtTkK+v4HfA9PEyBFCY9AGVgCBLaBp1jPAyfAJ/AAdIEG0dNAiyP7+K1qIfMdonZic6+WJoBJvQlvuwDqcXadUuqPA1NKAlexbRTAIMvMOCjTbMwl1LtI/6KWJ5Q6rT6Ht1MA58AX8Apcqqt5r2qhrgAXQC3CZ6i1+KMd9TRu3MvA3aH/fFPnBodb6oe6HM8+lYHrGdRXW8M9bMZtPXUji69lmf5Cmamq7quNLFZXD9Rq7v0Bpc1o/tp0fisAAAAASUVORK5CYII=)](https://github.com/marketplace/actions/rebase-pulls)\n\nA GitHub action to rebase pull requests in a repository.\n\n## Usage\n\nThe default behaviour of the action with no configured inputs is to check the current repository for rebaseable pull requests and rebase them.\nPull requests from forks are rebaseable only if they [allow edits from maintainers](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork).\n\n```yml\n      - uses: peter-evans/rebase@v3\n```\n\n### Periodically rebase all pull requests\n\nThe simplest way to use this action is to schedule it to run periodically.\n\n```yml\nname: Rebase\non:\n  schedule:\n    - cron:  '0 0 * * *'\njobs:\n  rebase:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: peter-evans/rebase@v3\n```\n\n### Rebase all pull requests on push to the base branch\n\n```yml\nname: Rebase\non:\n  push:\n    branches: [main]\njobs:\n  rebase:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: peter-evans/rebase@v3\n        with:\n          base: main\n```\n\n### Exclude pull requests with specific labels\n\n```yml\n      - uses: peter-evans/rebase@v3\n        with:\n          exclude-labels: |\n            no-rebase\n            dependencies\n```\n\n### Exclude pull request forks with head filter\n\n```yml\n      - uses: peter-evans/rebase@v3\n        with:\n          head: 'my-org:*'\n```\n\n### Action inputs\n\n| Name | Description | Default |\n| --- | --- | --- |\n| `token` | `GITHUB_TOKEN` or a `repo` scoped [PAT](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token). The `workflow` scope may also be required if rebasing pull requests containing changes to workflows under `.github/workflows`. | `GITHUB_TOKEN` |\n| `repository` | The target GitHub repository containing the pull request. | `github.repository` (Current repository) |\n| `head` | Filter pull requests by head user or head organization and branch name in the format `user:ref-name` or `organization:ref-name`. Use the `*` wildcard match any ref. e.g. `my-org:new-script-format` or `octocat:*`. | |\n| `base` | Filter pull requests by base branch name. Example: `gh-pages`. | |\n| `include-labels` | A comma or newline separated list of pull request labels to include. Allows any labels if unspecified. | |\n| `exclude-labels` | A comma or newline separated list of pull request labels to exclude. | |\n| `exclude-drafts` | Exclude draft pull requests. | `false` |\n| `rebase-options` | A comma or newline separated list of options to pass to the git rebase command. For example, `-Xtheirs`. | |\n\n### Rebase slash command\n\nUse the following two workflows and a `repo` scoped [PAT](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) to add a `/rebase` slash command to pull request comments.\nThe [slash-command-dispatch](https://github.com/peter-evans/slash-command-dispatch) action makes sure that the command is only executable by users with `write` access to the repository.\n\n```yml\nname: Slash Command Dispatch\non:\n  issue_comment:\n    types: [created]\njobs:\n  slashCommandDispatch:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Slash Command Dispatch\n        uses: peter-evans/slash-command-dispatch@v3\n        with:\n          token: ${{ secrets.PAT }}\n          commands: rebase\n          permission: write\n          issue-type: pull-request\n```\n\n```yml\nname: rebase-command\non:\n  repository_dispatch:\n    types: [rebase-command]\njobs:\n  rebase:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: peter-evans/rebase@v3\n        id: rebase\n        with:\n          head: ${{ github.event.client_payload.pull_request.head.label }}\n      - name: Add reaction\n        if: steps.rebase.outputs.rebased-count == 1\n        uses: peter-evans/create-or-update-comment@v1\n        with:\n          token: ${{ secrets.PAT }}\n          repository: ${{ github.event.client_payload.github.payload.repository.full_name }}\n          comment-id: ${{ github.event.client_payload.github.payload.comment.id }}\n          reaction-type: hooray\n```\n\n### Target other repositories\n\nYou can rebase requests in another repository by using a `repo` scoped [PAT](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) instead of `GITHUB_TOKEN`.\nThe user associated with the PAT must have write access to the repository.\n\nThis example targets multiple repositories.\n\n```yml\nname: Rebase\non:\n  schedule:\n    - cron:  '0 0 * * *'\njobs:\n  rebase:\n    strategy:\n      matrix:\n        repo: ['my-org/repo1', 'my-org/repo2', 'my-org/repo3']\n    runs-on: ubuntu-latest\n    steps:\n      - uses: peter-evans/rebase@v3\n        with:\n          token: ${{ secrets.PAT }}\n          repository: ${{ matrix.repo }}\n```\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeter-evans%2Frebase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeter-evans%2Frebase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeter-evans%2Frebase/lists"}