Open Poornachand200 opened 2 weeks ago
@peter-evans Please update on this.
Hi @Poornachand200
This is not a particularly common workflow, so I'm not 100% sure if what you want to do will work, but it looks like it should.
First of all, check that main
is being checked out properly in the first step. You could explicitly check it out by adding ref
. Also, just in case, update checkout to v4
.
- uses: actions/checkout@v4
with:
ref: main
I already had a branch and wanted to create a pullrequest whose base will be the other branch which I had defined while calling this action. But what this action does is just resets my already present PR branch to make it same as base branch and then says "this branch no longer differs from the base". Then I also tried creating another branch from my already created PR branch by giving different input to branch
but then it just says _Branch 'newbranch' is not ahead of base '***' and will not be created
can you suggest me a workaround for above? @peter-evans
@peter-evans checkout is updated as below. It seems the reference is still from the target branch test1 or test2.
@peter-evans We are also encountering conflicts because of this case.
@peter-evans Please update
@peter-evans We are facing conflicts because of this issue. Please assist.
@Poornachand200 I'm afraid I don't have a lot of time at the moment. The next thing you can do is provide a log of the complete run so I can see what is happening.
logs_28879649215.zip PFA of PR creation workflow log
@Poornachand200 I think I understand what you mean now. You need to follow the example here: https://github.com/peter-evans/create-pull-request/blob/main/docs/examples.md#keep-a-branch-up-to-date-with-another
i.e. Checkout the target, e.g. test1
, then reset the branch using main. Then call this action.
Branch is not created from default branch and it is creating from base branch
Describe your issue here.
I need to create a pull request to target branch test1 or test2. But I want to create the branch with reference to main. This means branch should be created or checked out from main branch. But the branch doesn't have changes from main. Instead it is getting created from test1 branch. Below is the example. The workflow actions runs on main branch.
Steps to reproduce
If this issue is describing a possible bug please provide (or link to) your GitHub Actions workflow.