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

jobs: pass fully qualified ref name to git ls-remote #840

Merged
merged 1 commit into from Mar 20, 2023

Conversation

jlebon
Copy link
Member

@jlebon jlebon commented Mar 20, 2023

Otherwise we risk getting multiple refs matching the given pattern (i.e. the branch name showing up in more branches than just the canonical branch). We hit this today with a revert branch that was auto-created accidentally by GitHub through the web UI:

$ git ls-remote https://github.com/coreos/fedora-coreos-config next
b9f8903339c142b00105bd0fb97c3fcc21e1502a        refs/heads/next
9007e5804e41097afaa7e42d13455d8a8cd87375        refs/heads/revert-2307-bootloader/next

And then the src_config_commit variable had multiple lines which messed up parameter substitution lower down.

Otherwise we risk getting multiple refs matching the given pattern (i.e.
the branch name showing up in more branches than just the canonical
branch). We hit this today with a revert branch that was auto-created
accidentally by GitHub through the web UI:

```
$ git ls-remote https://github.com/coreos/fedora-coreos-config next
b9f8903339c142b00105bd0fb97c3fcc21e1502a        refs/heads/next
9007e5804e41097afaa7e42d13455d8a8cd87375        refs/heads/revert-2307-bootloader/next
```

And then the `src_config_commit` variable had multiple lines which
messed up parameter substitution lower down.
Copy link
Member

@dustymabe dustymabe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jlebon jlebon merged commit 4d34195 into coreos:main Mar 20, 2023
1 check passed
@jlebon jlebon deleted the pr/ls-remote-tweak branch March 20, 2023 20:47
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

Successfully merging this pull request may close these issues.

None yet

2 participants