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 overriding Git user info for catalog commits #140

Merged
merged 2 commits into from
Jul 21, 2020

Conversation

daiboruta
Copy link
Contributor

@daiboruta daiboruta commented Jul 9, 2020

This commit introduces new arguments for commodore catalog compile for
overriding local Git user information when pushing commits to a cluster
catalog.

By default Commodore will use the local Git user information for catalog
commits.
To improve compatibility with existing Git configurations, the arguments
are named --git-author-name and --git-author-email to pick up the
familiar GIT_AUTHOR_NAME and GIT_AUTHOR_EMAIL environment variables
without any further configuration.

Please note: Commodore does not allow you to override commit author and
committer separately, and will use the provided author name and email,
if any, as both commit author and committer.

The commit also updates docker-compose.yaml to map ~/.gitconfig into
the container to propagate the global Git config into the container.
This simplifies reusing the Git author configuration on the host system
when running Commodore locally using docker-compose.

Checklist

  • Keep pull requests small so they can be easily reviewed.
  • Update the documentation.
  • Update tests.
  • Update the ./CHANGELOG.md.
  • Link this PR to related issues.

@srueg
Copy link
Contributor

srueg commented Jul 10, 2020

Thanks for this PR @daiboruta
Can you please rebase your changes on the latest master and resolve the conflicts?

commodore/config.py Outdated Show resolved Hide resolved
commodore/cli.py Outdated Show resolved Hide resolved
@simu simu changed the title Issue #63 Allow overriding Git user info for catalog commits\ Jul 20, 2020
@simu simu changed the title Allow overriding Git user info for catalog commits\ Allow overriding Git user info for catalog commits Jul 20, 2020
@simu simu requested a review from srueg July 20, 2020 15:59
Dai Boruta and others added 2 commits July 20, 2020 17:59
This commit introduces new arguments for `commodore catalog compile` for
overriding local Git user information when pushing commits to a cluster
catalog.

By default Commodore will use the local Git user information for catalog
commits.
To improve compatibility with existing Git configurations, the arguments
are named `--git-author-name` and `--git-author-email` to pick up the
familiar `GIT_AUTHOR_NAME` and `GIT_AUTHOR_EMAIL` environment variables
without any further configuration.

Please note: Commodore does not allow you to override commit author and
committer separately, and will use the provided author name and email,
if any, as both commit author and committer.

The commit also updates docker-compose.yaml to map `~/.gitconfig` into
the container to propagate the global Git config into the container.
This simplifies reusing the Git author configuration on the host system
when running Commodore locally using docker-compose.

Resolves projectsyn#63
@simu simu merged commit 6890464 into projectsyn:master Jul 21, 2020
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.

3 participants