Skip to content

Conversation

Penguinwizzard
Copy link

In cases where ESLINT_PLUGIN_DIFF_COMMIT is a commit hash, it would get prefixed with "origin/" to generate a string that does not resolve as a git ref. A similar operation would happen with a namespace-qualified ref - refs/heads/origin/main -> origin/refs/heads/main also yields a string that doesn't function as a ref.

This changes to detect cases where the provided ref is more explicit, and disables the origin/ prefixing in those cases.

In cases where ESLINT_PLUGIN_DIFF_COMMIT is a commit hash, it would get prefixed with "origin/" to generate a string that does not resolve as a git ref. A similar operation would happen with a namespace-qualified ref - `refs/heads/origin/main` -> `origin/refs/heads/main` also yields a string that doesn't function as a ref.

This changes to detect cases where the provided ref is more explicit, and disables the `origin/` prefixing in those cases.
@mohamedmansour
Copy link

/cc @paleite

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.

2 participants