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

Fix the git branch check. #16062

Merged
merged 6 commits into from
Apr 8, 2024
Merged

Conversation

mashhurs
Copy link
Contributor

@mashhurs mashhurs commented Apr 5, 2024

Release notes

[rn:skip]

What does this PR do?

Replaces git show-ref with git checkout to fix the issue where show-ref is not showing the branch needs to be checked out.

Why is it important/What is the impact to the user?

Not user impacted.

Checklist

  • My code follows the style guidelines of this project
  • [ ] I have commented my code, particularly in hard-to-understand areas
  • [ ] I have made corresponding changes to the documentation
  • [ ] I have made corresponding change to the default configuration files (and/or docker env variables)
  • [ ] I have added tests that prove my fix is effective or that my feature works

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Use cases

Screenshots

Logs

  • when branch exists
➜  logstash git:(upstream-main) ✗ ./.buildkite/scripts/snyk/report.sh
08e2162ee8a00616f207ce7797e1bee477d4e7bf
Reporting 8.13 branch.
0600ff98bbd54918c8d18d2e4372f96c71dc235c
Reporting main branch.
  • when branch doesn’t exist
➜  logstash git:(upstream-main) ✗ ./.buildkite/scripts/snyk/report.sh
fatal: Needed a single revision
8.14 branch doesn't exist.
0600ff98bbd54918c8d18d2e4372f96c71dc235c
Reporting main branch.

@mashhurs mashhurs requested a review from jsvd April 5, 2024 17:12
@mashhurs mashhurs self-assigned this Apr 5, 2024
Copy link

Quality Gate passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No Coverage information No data about Coverage
No Duplication information No data about Duplication

See analysis details on SonarQube

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

cc @mashhurs

Copy link
Member

@jsvd jsvd left a comment

Choose a reason for hiding this comment

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

LGTM

@jsvd jsvd merged commit 4a379be into elastic:main Apr 8, 2024
6 checks passed
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.

4 participants