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

Resets changes in the branch with main #2243

Closed
rprakashg-redhat opened this issue Aug 15, 2023 · 2 comments
Closed

Resets changes in the branch with main #2243

rprakashg-redhat opened this issue Aug 15, 2023 · 2 comments

Comments

@rprakashg-redhat
Copy link

I'm trying to use this action to simply open a PR but unfortunately its not working well. I noticed the changes in the branch gets reset with main and pull request never gets creating.

If you want to see the workflow run logs see this link https://github.com/rprakashg-redhat/scheduler/actions/runs/5867887999/job/15909654750

This is the remote repo I want the PR to be opened https://github.com/rprakashg-redhat/scheduler-ops but as you can see the changes in the branch gets reset by this action which is prolly why PR never gets created. If I remove the Open PR job I can correctly see the changes made by the job that updates manifest. Why is this action updating the branch and overwriting changes. I simply need to Open PR

Not sure what I'm missing

@Ole-Visma
Copy link

Ole-Visma commented Aug 23, 2023

I have the same issue

- name: Create Pull Request
  uses: peter-evans/[email protected] 
  with:
    base: main
    branch: version-${{ env.new_version }}
    title: 'Update to ${{ env.new_version }}'

image

@peter-evans
Copy link
Owner

Hi @rprakashg-redhat

Apologies for the slow response.

I think this is because you are trying to use a branch with existing changes to raise in a PR as the branch input. (Please correct me if that's not the case)

Please see this section of the common issues doc. (You didn't miss this doc, I just created it)
https://github.com/peter-evans/create-pull-request/blob/main/docs/common-issues.md#create-using-an-existing-branch-as-the-pr-branch

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

No branches or pull requests

3 participants