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

fix: set commit author as local config #152

Merged
merged 5 commits into from
Mar 12, 2020
Merged

fix: set commit author as local config #152

merged 5 commits into from
Mar 12, 2020

Conversation

peaceiris
Copy link
Owner

Close #151

Co-authored-by: Ryo Ota nwtgck@nwtgck.org

Close #151

Co-authored-by: Ryo Ota <nwtgck@nwtgck.org>
@codecov
Copy link

codecov bot commented Mar 11, 2020

Codecov Report

Merging #152 into master will decrease coverage by 17.19%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #152      +/-   ##
==========================================
- Coverage   69.06%   51.86%   -17.2%     
==========================================
  Files           3        4       +1     
  Lines         139      241     +102     
  Branches       26       40      +14     
==========================================
+ Hits           96      125      +29     
- Misses         43      116      +73
Impacted Files Coverage Δ
src/git-utils.ts 28.43% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b2788ae...8e46ca2. Read the comment docs.

@peaceiris
Copy link
Owner Author

@nwtgck Give me your review.

@nwtgck
Copy link
Contributor

nwtgck commented Mar 11, 2020

@peaceiris Thanks.

I also think without---global is better. However, git config still changes the environment of current working directory. So, I think using git commit --author="myname <myemail>" ... is better to minimize the effects.

@peaceiris
Copy link
Owner Author

peaceiris commented Mar 12, 2020

I tried to use git commit --author and got this problem: https://github.com/peaceiris/actions-gh-pages/runs/501948622?check_suite_focus=true#step:13:94

We can use a local git repository config (.git/config) instead of git commit --author.

This action creates a temporary directory, copies publish_dir/** under the directory, and uses it as a local git repository for each deployment. The following steps will not be broken by this action.

Could you review this change again? @nwtgck

@nwtgck
Copy link
Contributor

nwtgck commented Mar 12, 2020

@peaceiris Very great! Now ,I understood git commit --author causes Please tell me who you are. and the actions creates a temporary directory.

@peaceiris peaceiris marked this pull request as ready for review March 12, 2020 13:48
@peaceiris
Copy link
Owner Author

Thank you.

@peaceiris peaceiris merged commit a1ff787 into master Mar 12, 2020
@peaceiris peaceiris deleted the fix-git-config branch March 12, 2020 13:58
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.

Avoid to use git config --global for setting user name and email
2 participants