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: do not push empty commits #2831

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

Conversation

abitrolly
Copy link

No description provided.

@jenkins-x-bot
Copy link
Contributor

Hi @abitrolly. Thanks for your PR.

I'm waiting for a jenkins-x or todo member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the jenkins-x/lighthouse repository.

@ankitm123
Copy link
Member

/cc @rawlingsj

@ankitm123
Copy link
Member

I am not sure why we allowed empty commits in the first place? @rawlingsj any ideas?

@abitrolly
Copy link
Author

It was there from the first commit b226d96 Perhaps @jstrachan can remember.

@ankitm123
Copy link
Member

My guess is that it was done so that the release pipeline did not stop if there were issues with that step 🤷

@ankitm123
Copy link
Member

Also, since it's a harmless change, best to keep it as it is, we can remove it, once we know the motivation behind it.

@abitrolly
Copy link
Author

By harmless change do you mean this PR?

@ankitm123
Copy link
Member

By harmless change do you mean this PR?

No, I meant allowing the empty changes, It's harmless and does not break anything, but changing this, might lead to issues down the line. Probably best to understand the full implications before making this change.

@ankitm123
Copy link
Member

/hold
putting on hold, till we know more about the initial idea around allowing empty commits ...

@abitrolly
Copy link
Author

Not really harmless. I read it as a false alarm that a new version is released. Maybe I should stop looking for new versions. :D

Comment on lines +11 to 12
git commit -a -m "chore: upgrade jx version"
git push
Copy link
Member

Choose a reason for hiding this comment

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

The problem as @ankitm123 pointed out is that by not allowing empty commits this command could fail and thus the pipeline would fail. So when not allowing empty commits you should also handle that. For example like this

Suggested change
git commit -a -m "chore: upgrade jx version"
git push
if git commit -a -m "chore: upgrade jx version"
then
git push
fi

@jenkins-x-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign garethjevans
You can assign the PR to them by writing /assign @garethjevans in a comment when ready.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants