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

tests-via-crave.yml - switch to the correct branch for the PR #2124

Merged
merged 2 commits into from
Dec 8, 2023
Merged

tests-via-crave.yml - switch to the correct branch for the PR #2124

merged 2 commits into from
Dec 8, 2023

Conversation

uvatbc
Copy link
Contributor

@uvatbc uvatbc commented Dec 7, 2023

Description

PRs have remote refs.
That remote ref will not be automatically fetched when we fetch origin.

Solution

So how do we fetch it?

  1. first fetch the actual remote reference and map it to a "local ref". This is done using git fetch origin <remote-ref>:<name for local ref>
  2. Then we switch to the ref: git checkout <name for local ref>

This sets the state of the local clone to what the PR expects it to be

Tests

I've run this on a private repository with Crave's internal self-hosted Actions.

Needs to run against the solr GHA to test

Checklist

Please review the following and check all that apply:

  • I have reviewed the guidelines for How to Contribute and my code conforms to the standards described there to the best of my ability.
  • I have created a Jira issue and added the issue ID to my pull request title.
  • I have given Solr maintainers access to contribute to my PR branch. (optional but recommended)
  • I have developed this patch against the main branch.
  • I have run ./gradlew check.
  • I have added tests for my changes.
  • I have added documentation for the Reference Guide

PRs have remote refs.
That remote ref will not be automatically fetched when we fetch origin.
So how do we fetch it?
1. first fetch the actual remote reference and map it to a "local ref".
   This is done using git fetch <remote-ref>:<name for local ref>
2. Then we switch to the ref: git checkout <name for local ref>

This sets the state of the local clone to what the PR expects it to be
@janhoy janhoy requested a review from dsmiley December 7, 2023 09:08
@cpoerschke cpoerschke changed the title Switch to the correct branch for the PR tests-via-crave.yml - switch to the correct branch for the PR Dec 7, 2023
@dsmiley dsmiley merged commit a2f5e9e into apache:main Dec 8, 2023
2 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.

2 participants