-
-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feat]: Add target branch as parameter for creating PR #592
Comments
Hi @ambrosekwok and thanks for the suggestion. Initially missunderstood your request. Will think about the suggestion. |
I have got around this by using matrix's, however, if you want to target a specific branch for a single run, you cant totally do that too. In the following, I've added the branch name after the repo to checkout that branch only. steps:
- name: Checkout ${{ github.repository }} ${{ matrix.branch }}
uses: actions/checkout@v4
with:
ref: ${{ matrix.branch }}
token: ${{ secrets.PAT }} As I said earlier, I'm using a matrix to target two branches, so my strategy looks like the following: strategy:
matrix:
branch: [main, beta] |
Hi @WolfGreyDev thanks for your workaround. Possibly this is the solution because you actually need to use the actions/checkout action your mentioned way or it won't pull the right branch (it is using the default branch per default). Need to double check how to go on, but possibly a short documentation addon is sufficient. Remark |
That's right. Using the following sync settings: - name: ${{ matrix.settings.name }}
uses: AndreasAugustin/actions-template-sync@v2
if: github.repository != env.SOURCE_REPOSITORY
with:
source_repo_path: ${{ env.SOURCE_REPOSITORY }}
upstream_branch: ${{ matrix.branch }}
pr_branch_name_prefix: ${{ matrix.branch }}_${{ matrix.settings.name }}
pr_title: "[${{ matrix.branch }}] [${{ matrix.settings.name }}] ${{ matrix.settings.pr_title }}"
pr_commit_msg: ${{ matrix.settings.pr_message }}
pr_labels: ${{ matrix.settings.name }}
git_remote_pull_params: ${{ matrix.branch }} ${{ matrix.settings.pull_params }}
template_sync_ignore_file_path: .${{ matrix.settings.name }}-ignore Obviously this has an additional matrix (settings) as I need different |
Describe the feature
Add target merge branch option as parameter to the action.
Currently, it is same as upstream_branch
Use Case
I think the downstream repository may want to use main branch in the template repository, but prefer different branch like develop for creating the PR.
Proposed Solution
No response
Acknowledgements
The text was updated successfully, but these errors were encountered: