gravwell/Sync Branches
Opens/Updates pull requests according to source/target branch name patterns.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| GITHUB_TOKEN | Token to use to inspect PRs and create intermediate branches as required. | yes | — |
| PR_CREATE_TOKEN | The token used to create PRs. Must be a Personal Access Token (PAT), not `GITHUB_TOKEN`. PRs opened with `GITHUB_TOKEN` will not run Actions: https://github.com/orgs/community/discussions/55906 If you want newly-opened PRs to run actions, you'll need to provide a PAT for `PR_CREATE_TOKEN`. A fine-grained PAT will work. It requires Read and Write for PR and Read for Content If `PR_CREATE_TOKEN` is omitted, `GITHUB_TOKEN` will be used to create PRs. | — | — |
| use_intermediate_branch | Set to false to open PRs directly from source branches to target branches. Set to true to merge the source and target branches into an intermediate branch, and open a PR from the intermediate branch to the target branch. Intermediate branches are automatically updated whenever the source branch or target branch is updated. Intermediate branches are useful when branch protections require the head (source) branch be up-to-date with the base (target) branch. | yes | — |
| source_pattern | The branch (or pattern) to use for the PR source (head). | yes | — |
| target_pattern | The branch (or pattern) to use for the PR target (base). | yes | — |
| pr_title | A mustache-templated string to use to construct the PR title | — | chore: Merge {{{ original_source }}} into {{{ target }}} |
| pr_body | A mustache-templated string to use to construct the PR body | — | This PR addresses no issue. It proposes merging `{{{ original_source }}}` into `{{{ target }}}`{{#use_intermediate_branch}} via `{{{ source }}}`{{/use_intermediate_branch}}. |
| source_conflict_label | A label to apply when a conflict is detected between the source branch and intermediate branch. Not relevant if there's no intermediate branch. If omitted, then no labels will be applied | — | — |
| target_conflict_label | A label to apply when a conflict is detected between the intermediate branch and the target branch. If not using an intermediate branch, this label will be applied if there is a conflict between the source branch and target branch. If omitted, then no labels will be applied. | — | — |
Outputs
| name | description |
|---|---|
| syncedPRs | An array of objects describing each updated PR. See README for details. |