Skip to content

Workflow: add rebase code after checkout #4827

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: master
Choose a base branch
from

Conversation

Syspretor
Copy link
Collaborator

Ⅰ. Describe what this PR does

Ⅱ. Does this pull request fix one issue?

fixes #XXXX

Ⅲ. List the added test cases (unit test/integration test) if any, please explain if no tests are needed.

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

Copy link

fluid-e2e-bot bot commented Apr 2, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign cheyang for approval by writing /assign @cheyang in a comment. For more information see:The Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@Syspretor Syspretor force-pushed the workflow/add-code-rebase-after-checkout branch 3 times, most recently from 563bb47 to 2a61dc8 Compare April 2, 2025 03:32
Signed-off-by: 玖宇 <guotongyu.gty@alibaba-inc.com>
@Syspretor Syspretor force-pushed the workflow/add-code-rebase-after-checkout branch from 2a61dc8 to 471bdb6 Compare April 7, 2025 02:19
Copy link

sonarqubecloud bot commented Apr 7, 2025

# Check if the current branch contains the latest master commit
MASTER_COMMIT=$(git rev-parse origin/master)
if ! git merge-base --is-ancestor $MASTER_COMMIT HEAD; then
echo "::error ::Current branch is not up-to-date with master. Please rebase."
Copy link
Member

Choose a reason for hiding this comment

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

Better to provide a command like:

Suggested change
echo "::error ::Current branch is not up-to-date with master. Please rebase."
echo "::error ::Current branch is not up-to-date with master. Please rebase with `git fetch origin master && git rebase origin/master`"

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