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

[Feature]: Add {{author}} to the commit template #691

Closed
dhmmasson opened this issue Feb 16, 2024 · 4 comments
Closed

[Feature]: Add {{author}} to the commit template #691

dhmmasson opened this issue Feb 16, 2024 · 4 comments

Comments

@dhmmasson
Copy link

Description

Obsidian-git facilitates collaboration on a single Obsidian vault by allowing users to synchronize their vault to a remote Git repository. However, in the current implementation, one cannot specify the author in the automatic backup/commit messages. This feature becomes crucial in collaborative environments where multiple users contribute to the same Obsidian vault.

Proposed Enhancement

Introduce a new variable, {{author}}, to Obsidian-git commit messages template.

Use Case

In scenarios where multiple users are collaborating on a shared Obsidian vault, the ability to attribute changes to specific authors enhances transparency and accountability.

Additional Context

Obsidian-git already supports the use of {{hostname}} in commit messages for situations where a single user manages notes across different devices. Extending this support to include {{author}} would provide a comprehensive solution for both single-user and collaborative environments.

Example

Commit message on auto backup/commit
vault backup: {{date}} - {{author}
vault backup: 2024-02-16 - dhmmasson
@Vinzent03
Copy link
Collaborator

What's the benefit of showing the author name in the commit message if the commit already contains the author, which is shown in git log or GitHub commit history as well?

@dhmmasson
Copy link
Author

dhmmasson commented Feb 25, 2024

Thank your for your response.

The benefit is to see it in the history view in obsidian :
Screen Shot 2024-02-25 at 17 55 03.

I think I went from the idea of the {{date}} that is also in the commit. That Backup is the backup of the modification by X at T. it was simple and customizable.

But you are right that it could be directly displayed in the history view from the commit info instead of embedded in the message, that would probably imply having a set of options similar to the line-authoring. Allowing to customize

  • Author name display (none, initials, fullname...)
  • Author name position (before|after)
  • Authoring date display

Would you be interested in a PR to support that feature ?

@Vinzent03
Copy link
Collaborator

I've added the feature now myself, but thanks for offering to contribute. There are now two new options in the settings.

@dhmmasson
Copy link
Author

Thank you for adding that feature!
It would have been a pleasure to contribute directly as I really appreciate your plugin.
I'll gladly contribute to other issues if you are interested.

Best,

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 a pull request may close this issue.

2 participants