Skip to content

Fix handling of explicit references to baseline commit #69

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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