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

Custom commit message #25

Open
mikhailbot opened this issue Oct 15, 2018 · 5 comments
Open

Custom commit message #25

mikhailbot opened this issue Oct 15, 2018 · 5 comments

Comments

@mikhailbot
Copy link

So I know you can create custom commands to do things, but is there an easy way to add some text before/after the commit message so that when looking at the commit history we know it's from Spock?

So instead of Submission saved it could be [Spock] Submission saved or some other easy way to see what's an automated change versus a human one?

@mikhailbot
Copy link
Author

mikhailbot commented Oct 15, 2018

If a custom command is the way to do this, I assume I'd adjust the below to something like:

$commands[] = vsprintf('git commit -m "%s%s%s"', [
    '[Spock] ',
    $this->label(),
    $this->user ? ' by ' . $this->user->username() : ''
]);

@jasonvarga
Copy link
Member

You could try changing the git user name or email to be Spock in commands_before

git config user.name "Spock"

@mikhailbot
Copy link
Author

You could try changing the git user name or email to be Spock in commands_before

git config user.name "Spock"

Oh yeah, that could be better even, so it doesn't look like I'm the one committing everything!

@mikhailbot
Copy link
Author

So the only downside to that is because the email is still mine, Github will show my username not Spock. I could change the email and that would work showing as an unknown user instead of myself. Not ideal but I think that'll work for now.

@aerni
Copy link

aerni commented Oct 18, 2018

The new Spock Update is awesome. @jasonvarga Can you do something like this:

git_username: '{{ committer:username }}'
git_email: '{{ committer:email }}'

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

No branches or pull requests

3 participants