Skip to content
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

Allow force push #19

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Allow force push #19

wants to merge 8 commits into from

Conversation

jacopocarlini
Copy link

Added a variable to allow the force push on the other repo to update the PR.

allow_force_push: [optional] Allow force push. Push with --force flag.

Why:
If you re-run this action but the PR is still open you get an error (branch already exists).

Example:

name: Push File

on: push

jobs:
  pull-request:
    runs-on: ubuntu-latest
    steps:
    - name: Checkout
      uses: actions/checkout@v2

    - name: Create pull request
      uses: paygoc6/action-pull-request-another-repo@main
      env:
        API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
      with:
        source_folder: 'source-folder'
        destination_repo: 'user-name/repository-name'
        destination_folder: 'folder-name'
        destination_base_branch: 'branch-name'
        destination_head_branch: 'branch-name'
        user_email: 'user-name@paygo.com.br'
        user_name: 'user-name'
        pull_request_reviewers: 'reviewers'
        allow_force_push: 'true'

@zhongyuan-jin
Copy link

had the similiar issue, can we merge this one? thanks

@jacopocarlini
Copy link
Author

had the similiar issue, can we merge this one? thanks

At the moment you can use my action v1.0.6

              - name: Pull Request another repository - JVersion
                uses: jacopocarlini/action-pull-request-another-repo@v1.0.6
            

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants