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

commit message always set to "Committing changes..." (v0.50.0a0) #1281

Closed
CagtayFabry opened this issue Oct 25, 2023 · 2 comments · Fixed by #1283
Closed

commit message always set to "Committing changes..." (v0.50.0a0) #1281

CagtayFabry opened this issue Oct 25, 2023 · 2 comments · Fixed by #1283
Labels

Comments

@CagtayFabry
Copy link

Thanks for releasing with support for JupyterLab 4 !
Trying out the 0.50.0a0 release, I noticed that my commit messages (summary and/or description) are not registered with git, instead every commit shows Committing changes... as commit message.

Description

When committing changes using the extension UI, the commit message is always set to Committing changes... .
This can be verified using git log or the history view of the extension (commit console was created from command line):
image

Reproduce

  1. Go to any git repository (or create a new one)
  2. Stage changes
  3. Enter commit summary (and optionally description)
  4. click COMMIT in the extension UI
  5. verify git log

Expected behavior

The commit message summary and description provided by the user should be attached to the commit.

Context

  • Python package version:
`
# Name                    Version                   Build  Channel
jupyterlab-git            0.50.0a0                 pypi_0    pypi
  • Extension version:
JupyterLab v4.0.7
/opt/tljh/user/share/jupyter/labextensions
        nbdime-jupyterlab v3.0.0-alpha.1 enabled OK
        k3d v2.15.3 enabled OK (python, k3d)
        jupyterlab-jupytext v1.3.9 enabled  X (python, jupytext)
        jupyter-matplotlib v0.11.3 enabled OK
        jupyterlab-myst v2.1.0 enabled OK (python, jupyterlab_myst)
        jupyterlab_pygments v0.2.2 enabled  X (python, jupyterlab_pygments)
        jupyterlab_code_formatter v2.2.1 enabled  X (python, jupyterlab_code_formatter)
        @jupyterlab-contrib/spellchecker v0.8.4 enabled OK (python, jupyterlab-spellchecker)
        @jupyterlab/git v0.50.0-a0 enabled OK (python, jupyterlab-git)
        @jupyter-widgets/jupyterlab-manager v5.0.8 enabled OK (python, jupyterlab_widgets)
        @jupyter-server/resource-usage v1.0.0 enabled OK (python, jupyter-resource-usage)
        @voila-dashboards/jupyterlab-preview v2.3.0 enabled OK (python, voila)
        @jupyter-notebook/lab-extension v7.0.2 enabled OK


   The following extensions are outdated:
        jupyterlab-jupytext
        jupyterlab_pygments
        jupyterlab_code_formatter
        
   Consider checking if an update is available for these packages.
  • Git version:
git version 2.34.1
  • Operating System and its version:
ubuntu 22.04
Command Line Output
Paste the output from your command line running `jupyter lab` here, use `--debug` if possible.
Web Browser Output
Paste the output from your browser web console here.
@welcome
Copy link

welcome bot commented Oct 25, 2023

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@krassowski
Copy link
Member

Indeed, message gets overridden here:

private _commitStagedFiles = async (
message: string | null = null,
notificationId?: string
): Promise<void> => {
const errorMsg = this.props.trans.__('Failed to commit changes.');
let id: string | null = notificationId ?? null;
try {
const author = await this._hasIdentity(this.props.model.pathRepository);
const message = this.props.trans.__('Committing changes...');
if (id !== null) {
Notification.update({
id,
message,
autoClose: false
});
} else {
id = Notification.emit(message, 'in-progress', { autoClose: false });
}
if (this.state.commitAmend) {
await this.props.model.commit(null, true, author);
} else {
await this.props.model.commit(message, false, author);
}

It is quite interesting case of TypeScript not picking it up because it is in another scope (try-catch context).

@fcollonval fcollonval linked a pull request Oct 25, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants