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

Allow commit & push #887

Merged
merged 5 commits into from
Apr 3, 2021
Merged

Conversation

ktaletsk
Copy link
Contributor

Implements #837

So, here's my take on enabling 'Commit and push' in place of 'Commit' button. I pass branch information along with boolean flag to GitCommitBox so that it can render 'Commit and Push' or display the error hint when applicable. Push action is added on the back of GitPanel.commitStagedFiles. There is also a new flag in extension settings to enable/disable this behavior.

Please, check the code and if it doesn't make sense, I am open to rewriting it.

@github-actions
Copy link

Binder 👈 Launch a binder notebook on branch ktaletsk/jupyterlab-git/commit-and-push

Copy link
Member

@fcollonval fcollonval left a comment

Choose a reason for hiding this comment

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

Thanks @ktaletsk

I added some suggestion to have a better API.

src/components/CommitBox.tsx Outdated Show resolved Hide resolved
src/components/CommitBox.tsx Outdated Show resolved Hide resolved
@fcollonval fcollonval self-requested a review April 3, 2021 10:55
@fcollonval fcollonval merged commit 6b95bc9 into jupyterlab:master Apr 3, 2021
@fcollonval
Copy link
Member

@meeseeksdev backport to jlab-2

@lumberbot-app
Copy link

lumberbot-app bot commented Apr 3, 2021

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
$ git checkout jlab-2
$ git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
$ git cherry-pick -m1 6b95bc9dfd31e9a5e829100a411e563176624e56
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
$ git commit -am 'Backport PR #887: Allow `commit & push`'
  1. Push to a named branch :
git push YOURFORK jlab-2:auto-backport-of-pr-887-on-jlab-2
  1. Create a PR against branch jlab-2, I would have named this PR:

"Backport PR #887 on branch jlab-2"

And apply the correct labels and milestones.

Congratulation you did some good work ! Hopefully your backport PR will be tested by the continuous integration and merged soon!

If these instruction are inaccurate, feel free to suggest an improvement.

fcollonval added a commit to fcollonval/jupyterlab-git that referenced this pull request Apr 3, 2021
@fcollonval fcollonval mentioned this pull request Apr 3, 2021
fcollonval added a commit that referenced this pull request Apr 3, 2021
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