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

Enhance the deploy command to enable the setting of git user.name and user.email in deployment branch #9101

Closed
2 tasks done
amdshrif opened this issue Jun 25, 2023 · 1 comment · Fixed by #9102
Closed
2 tasks done
Labels
feature This is not a bug or issue with Docusausus, per se. It is a feature request for the future.

Comments

@amdshrif
Copy link
Contributor

Have you read the Contributing Guidelines on issues?

Description

Enhance the deploy command to enable the setting of git user.name and user.email specifically for the deployment branch. This way, Git will utilize the local git configuration instead of the global configuration when making commits to the deployment branch.

Has this been requested on Canny?

NA

Motivation

In my system, I have separate configurations for my personal and work Git users. These configurations are set on a per-repository basis rather than globally. However, when I use the command "yarn deploy," it automatically sets the user.name and user.email to default values, which are based on my hostname. I would rather not share this information on GitHub and have the option to set the user.name and user.email that I would like to use for commiting changes to deployment branch.

API design

I have added 2 environment variables to set the user.name and user.email

Have you tried building it?

Yes, I have added 2 environment variables to set the user.name and user.email

Self-service

  • I'd be willing to contribute this feature to Docusaurus myself.
@amdshrif amdshrif added feature This is not a bug or issue with Docusausus, per se. It is a feature request for the future. status: needs triage This issue has not been triaged by maintainers labels Jun 25, 2023
amdshrif added a commit to amdshrif/docusaurus that referenced this issue Jun 25, 2023
amdshrif added a commit to amdshrif/docusaurus that referenced this issue Jun 25, 2023
@slorber
Copy link
Collaborator

slorber commented Jun 29, 2023

I don't think we need a change, see my comment here: #9102 (review)

However, when I use the command "yarn deploy," it automatically sets the user.name and user.email to default values, which are based on my hostname.

It's your responsibility to ensure that your git config is good before running that CLI.

We currently don't "automatically sets" any config in the CLI, and I don't think we should.

slorber added a commit that referenced this issue Jul 3, 2023
…me / user.email in deployment branch (#9101) (#9102)

Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
@slorber slorber removed the status: needs triage This issue has not been triaged by maintainers label Jul 3, 2023
This was referenced Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This is not a bug or issue with Docusausus, per se. It is a feature request for the future.
Projects
None yet
2 participants