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

CONTRIB: Add checking script before push #10203

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tvegas1
Copy link
Contributor

@tvegas1 tvegas1 commented Oct 2, 2024

What

Shell script to perform simple preliminary checks before pushing.

Why ?

Avoid spending CI cycles with repeated pushing.

How ?

Implement commit title, code format and spell checks locally. Ran shellcheck on it.

$ ./contrib/gitready.sh
$ ./contrib/gitready.sh --push origin/my_branch

git add -p
# returns 1 if cached index is not empty
git diff --cached --exit-code || git commit -m "$title"
git reset --hard
Copy link
Contributor

Choose a reason for hiding this comment

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

why is it needed? Don't we expect that there are no any uncommited changes at this stage?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

while handling git add -p it might be that we did not stage all buffers, hence the cleaning of the remaining changes before doing the same for spellcheck.

@tvegas1
Copy link
Contributor Author

tvegas1 commented Oct 14, 2024

/azp run UCX PR

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

@yosefe yosefe left a comment

Choose a reason for hiding this comment

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

can we unify the manual checks with the ones run in CI, so they will not diverge over time?

@tvegas1
Copy link
Contributor Author

tvegas1 commented Oct 17, 2024

can we unify the manual checks with the ones run in CI, so they will not diverge over time?

fixed, i guess before final merge and after approve/squash, it would be good that I trigger one commit title failure and one spellcheck failure.

@yosefe
Copy link
Contributor

yosefe commented Oct 18, 2024

/azp run UCX PR

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

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.

3 participants