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

GitHub Actions checks out repo for PRs in detached head #17

Closed
calebwherry opened this issue Oct 13, 2021 · 2 comments
Closed

GitHub Actions checks out repo for PRs in detached head #17

calebwherry opened this issue Oct 13, 2021 · 2 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@calebwherry
Copy link
Collaborator

GitHub decided that when it runs Actions, it checks out PRs in detached head. See info here: actions/checkout#6

This is a problem for us because we need a working git and repo to run integration tests.

@calebwherry calebwherry added the bug Something isn't working label Oct 13, 2021
@calebwherry calebwherry added this to the Git PR v1.0.0 milestone Oct 13, 2021
@calebwherry calebwherry added this to To do in GitPr Kanban via automation Oct 13, 2021
@calebwherry calebwherry self-assigned this Oct 13, 2021
calebwherry pushed a commit that referenced this issue Oct 13, 2021
GitHub checks out the repo in a detached head state. We use
a trick noted in the task to fix it.

Try 2...
calebwherry pushed a commit that referenced this issue Oct 13, 2021
GitHub checks out the repo in a detached head state. We use
a trick noted in the task to fix it.

Try 3...
@calebwherry
Copy link
Collaborator Author

None of the workarounds actually work for us. The current output of "git all branches" is:

"* pull-request\n remotes/pull/1/merge\n"

This is... not what we are expecting. Not sure how to resolve this one. @robertdfrench we'll have to dig into this a little more.

@calebwherry
Copy link
Collaborator Author

calebwherry commented Oct 13, 2021

@robertdfrench I've been thinking about what to do here. I wonder if it would be better for our integration tests to have a setup step create a new repo. That way we don't rely on the current repo state for testing?

Hopefully this wouldn't add too much overheard to our test running time. Would also help with isolation as we could set it up exactly like we want.

GitPr Kanban automation moved this from To do to Done Oct 13, 2021
calebwherry pushed a commit that referenced this issue Oct 17, 2021
GitHub checks out the repo in a detached head state. We use
a trick noted in the task to fix it.
calebwherry pushed a commit that referenced this issue Oct 17, 2021
GitHub checks out the repo in a detached head state. We use
a trick noted in the task to fix it.

Try 2...
calebwherry pushed a commit that referenced this issue Oct 17, 2021
GitHub checks out the repo in a detached head state. We use
a trick noted in the task to fix it.

Try 3...
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
Development

No branches or pull requests

1 participant