GitHub Action to sync one branch when another is updated.
GITHUB_TOKENRequired The token to be used for creating the pull request. Can be set to the one given for the workflow or another user.
FROM_BRANCHRequired The branch you want to make the pull request from.
TO_BRANCHRequired The branch you want to make the pull request to.
PULL_REQUEST_TITLEWhat you would like as the title of the pull request.
Default: sync: {FROM_BRANCH} to {TO_BRANCH}
PULL_REQUEST_BODYWhat you would like in the body of the pull request.
Default: sync-branches: New code has just landed in {FROM_BRANCH} so let's bring {TO_BRANCH} up to speed!
PULL_REQUEST_IS_DRAFTSet to true for the pull request to be opened as a draft.
Default: false
CONTENT_COMPARISONSet to true to force checking content comparison between branches.
No more empty pull requests being opened and triggering CI jobs.
Default: false
REVIEWERSJSON array of GitHub user logins that will be requested to review the PR. Example: '['tretuna']'
Default: []
TEAM_REVIEWERSJSON array of GitHub team slugs that will be requested to review the PR. Example: '['js-team']'
Default: []
PULL_REQUEST_URLSet to the URL of either the pull request that was opened by this action or the one that was found to already be open between the two branches
PULL_REQUEST_NUMBERPull request number from generated pull request or the currently open one
name: Sync
on:
push:
branches:
- main
jobs:
sync-branches:
runs-on: ubuntu-latest
name: Syncing branches
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: 12
- name: Opening pull request
id: pull
uses: tretuna/sync-branches@1.4.0
with:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
FROM_BRANCH: "main"
TO_BRANCH: "develop"
$ claude mcp add sync-branches \
-- python -m otcore.mcp_server <graph>