{"id":16426793,"url":"https://github.com/lcdsmao/update-branch","last_synced_at":"2025-07-27T08:40:50.739Z","repository":{"id":37796049,"uuid":"334840901","full_name":"lcdsmao/update-branch","owner":"lcdsmao","description":"Merge your pull request in order when enabled the Require branches to be up to date before merging","archived":false,"fork":false,"pushed_at":"2024-05-29T12:39:14.000Z","size":2191,"stargazers_count":11,"open_issues_count":7,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-19T09:41:32.958Z","etag":null,"topics":["auto-merge","github","github-actions","merge-queue","mergify","update-branch"],"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/lcdsmao.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2021-02-01T05:29:48.000Z","updated_at":"2025-07-18T12:20:26.000Z","dependencies_parsed_at":"2023-11-12T07:27:58.514Z","dependency_job_id":"b7e750c5-abe8-42c9-a2f7-2652454d34f3","html_url":"https://github.com/lcdsmao/update-branch","commit_stats":{"total_commits":193,"total_committers":3,"mean_commits":64.33333333333333,"dds":"0.12435233160621761","last_synced_commit":"21e6943097ddbd2004c19fb8f98d22ddcbc3863c"},"previous_names":[],"tags_count":28,"template":false,"template_full_name":"actions/typescript-action","purl":"pkg:github/lcdsmao/update-branch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lcdsmao%2Fupdate-branch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lcdsmao%2Fupdate-branch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lcdsmao%2Fupdate-branch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lcdsmao%2Fupdate-branch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lcdsmao","download_url":"https://codeload.github.com/lcdsmao/update-branch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lcdsmao%2Fupdate-branch/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267331264,"owners_count":24070160,"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","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["auto-merge","github","github-actions","merge-queue","mergify","update-branch"],"created_at":"2024-10-11T08:10:26.654Z","updated_at":"2025-07-27T08:40:50.703Z","avatar_url":"https://github.com/lcdsmao.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Update Branch\n\nMerge your pull request in order when enabled the `Require branches to be up to date before merging`.\n\nInspired by [Merge Queue feature of Mergify](https://mergify.io/features/merge-queue).\n\n\u003e Safety\n\u003e\n\u003e Do not merge broken pull requests. By merging your pull requests serially using a queue, your code is safe. Each pull request is tested with the latest CI code.\n\n\u003e Save CI time\n\u003e\n\u003e Rather than overconsuming your CI time by trying to merge multiple pull requests, just run it once before the pull request gets merged.\n\n## Quick Start\n\n\u003e This action only has effect if you enabled `Settings/Branches/YourBranchProtectionRule/Require status checks to pass before merging/Require branches to be up to date before merging`.\n\n1. Enable `Allow auto-merge` in `Settings/Options`.\n\n2. Create a workflow file (`.github/workflow/update-branch.yaml`):\n\nExample:\n\n```yaml\nname: Update branch\n\non:\n  push:\n    branches:\n      - main\n  pull_request:\n    types:\n      - labeled\n  check_suite:\n    types:\n      - completed\n\n  # Allows you to run this workflow manually from the Actions tab\n  workflow_dispatch:\n\njobs:\n  update-branch:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: lcdsmao/update-branch@v3\n        with:\n          # Or use personal access token\n          token: ${{ secrets.GITHUB_TOKEN }}\n          # One of MERGE, SQUASH, REBASE (default: MERGE)\n          autoMergeMethod: SQUASH\n          # Ignore pull requests without these labels\n          requiredLabels: auto-merge\n          # Required at least 2 approves (default: 0)\n          requiredApprovals: 2\n          # Required approvals from all requested reviewers\n          allRequestedReviewersMustApprove: true\n          # Required these status checks success\n          requiredStatusChecks: |\n            build_pr\n            WIP\n          # Optionally set the maximum amount of pull requests to match against (default: 50)\n          fetchMaxPr: 50\n          # Optionally set the maximum amount of pull request checks to fetch (default: 100)\n          fetchMaxPrChecks: 100\n          # Optionally set the maximum amount of pull request labels to fetch (default: 10)\n          fetchMaxPrLabels: 10\n          # Optionally set the maximum amount of pull request comments to fetch (default: 50)\n          fetchMaxComments: 50\n          # The order pr checks should be fetched in. If the required checks are the last ones, consider setting to \"last\"\n          prChecksFetchOrder: first\n```\n\nIf you are using a personal access token and it has permission to access branch protection rules, you can set your jobs like:\n\n```yaml\njobs:\n  update-branch:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: lcdsmao/update-branch@v3\n        with:\n          # Personal access token\n          token: ${{ secrets.MY_PAT }}\n          # One of MERGE, SQUASH, REBASE (default: MERGE)\n          autoMergeMethod: SQUASH\n          # Ignore pull requests without these labels\n          requiredLabels: auto-merge\n          # `Status checks` and `Require approvals` settings will be used\n          # Or ignore this key then the action will automatically find main or master branch protection rule\n          protectedBranchNamePattern: trunk\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flcdsmao%2Fupdate-branch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flcdsmao%2Fupdate-branch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flcdsmao%2Fupdate-branch/lists"}