Skip to content

Cant create pull request in remote repository with "remote" changes #990

@oliverabclabs

Description

@oliverabclabs

Subject of the issue

From my backend repo I push changes to the frontend repo using another action. This works fine. But I cannot seem to create a PR using this action from that branch. I assume this is because the changes are not local, they only exist remotely in the feature branch-111. Shouldnt it be possible to create a PR then?

I get:

Branch 'branch-111' no longer differs from base branch 'dev'

In short: I want to create a PR in a remote repository from a branch 'branch-111' to dev and they already differ.

Steps to reproduce

I have the following workflow snippet in backend repo (code is obfuscated for privacy reasons)

      - name: Pushes types to 
        uses: foobar/copy_file_to_another_repo_action@main
        env:
          API_TOKEN_GITHUB: ${{ secrets.PAT }}
        with:
          source_file: 'dist/dto-type-declarations.ts'
          destination_repo: 'foobar/frontendrepo'
          destination_folder: 'src/models'
          destination_branch_create: 'branch-111'
          destination_branch_create_origin: 'dev'
          user_email: 'bot@github.action'
          user_name: 'github_bot'
          commit_message: 'Backend Push Event'

      - uses: actions/checkout@v2
        with:
          token: ${{ secrets.REPO_ACCESS_TOKEN }}
          repository: foobar/frontendrepo
          ref: branch-111
          path: blablabla

      - name: Create Pull Request
        uses: peter-evans/create-pull-request@v3
        with:
          token: ${{ secrets.REPO_ACCESS_TOKEN }}
          branch: branch-111
          base: dev
          title: 'Blabla'
          body: |
            Blbal
            - Blabla
          labels: |
            automated pr
          draft: true
          path: blablabla

Any help is very much appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions