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

Pull requests without dedicated branch fail creating the matrix #24

Closed
boesing opened this issue Apr 2, 2021 · 6 comments
Closed

Pull requests without dedicated branch fail creating the matrix #24

boesing opened this issue Apr 2, 2021 · 6 comments
Labels
Bug Something isn't working

Comments

@boesing
Copy link
Member

boesing commented Apr 2, 2021

Bug Report

Q A
Version(s) 1.5.2

Summary

It seems that for pull requests, which are created from the same branch in the forked repository, it is not possible to create a diff for the matrix generation.

Current behavior

Target branch: 1.2.x
Project branch: 1.2.x

Cloning into '.'...
Cloning repository
Checking out branch 1.2.x
Already on '1.2.x'
Your branch is up to date with 'origin/1.2.x'.
Fetching target ref refs/pull/7/merge
fatal: Refusing to fetch into current branch refs/heads/1.2.x of non-bare repository

https://github.com/laminas/laminas-mvc-i18n/pull/7/checks?check_run_id=2254661339

How to reproduce

Fork a repository, do not create a dedicated feature/bugfix/whatever branch but push to the same branch, the PR is targeted to later on.

Expected behavior

Matrix generation works without conflicting when creating a diff.
Works when the source branch differs: https://github.com/laminas/laminas-mvc-i18n/pull/10/checks?check_run_id=2254711601

@boesing boesing added the Bug Something isn't working label Apr 2, 2021
@boesing
Copy link
Member Author

boesing commented Apr 2, 2021

Uh, interesting fact. I've created a dedicated PR with the same commit but other source branch and the same checks are applied for both PRs:

laminas/laminas-mvc-i18n#7
laminas/laminas-mvc-i18n#10

@gpgkd906
Copy link

gpgkd906 commented Apr 8, 2021

@boesing
I think I have meet the same problem, with this PR
how can i fix this?

@boesing
Copy link
Member Author

boesing commented Apr 8, 2021

@gpgkd906 Best practice is to have a dedicated branch for anything you are working on in git.
So you should create a feature branch, e.g. feature/php80, and use that for PRs.

You can use this cheat sheet for more details on how to create that branch: https://education.github.com/git-cheat-sheet-education.pdf

@gpgkd906
Copy link

gpgkd906 commented Apr 8, 2021

@boesing
Thanks very much.
I create a feature branch feature/php80 and create a new PR then it passed.
the interesting things is, when new PR passed, the old PR which was failed, now is passed too.

@boesing
Copy link
Member Author

boesing commented Apr 8, 2021

the interesting things is, when new PR passed, the old PR which was failed, now is passed too.

Thats exactly what I've found out in my second comment in this issue. 👍🏼

@boesing
Copy link
Member Author

boesing commented Apr 21, 2021

Fixed with v1.7.1

@boesing boesing closed this as completed Apr 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants