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: Abbreviate commit_sha to be back to being the short SHA #502

Merged
merged 1 commit into from
Apr 28, 2023

Conversation

DenverCoder1
Copy link
Contributor

Fixes #501

In Simple Git 3.6.0, the default value of commit was changed to be the full commit instead of the short 7 character SHA. This causes the commit_sha and commit_long_sha to return the same value instead of commit_sha being the 7-character abbreviated version as it says in the docs.

This change makes commit_long_sha use the SHA from Simple Git and abbreviates commit_sha to a maximum of 7 characters.

@ghost
Copy link

ghost commented Apr 25, 2023

👇 Click on the image for a new way to code review

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map legend

Copy link
Owner

@EndBug EndBug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right! Thanks for catching that ✨

@EndBug EndBug merged commit db30269 into EndBug:main Apr 28, 2023
@EndBug
Copy link
Owner

EndBug commented Apr 28, 2023

@all-contributors please add @DenverCoder1 for their bug report and code contribution ;)

@allcontributors
Copy link
Contributor

@EndBug

I've put up a pull request to add @DenverCoder1! 🎉

@DenverCoder1 DenverCoder1 deleted the fix-commit_sha branch April 29, 2023 17:12
MaxymVlasov referenced this pull request in SpotOnInc/renovate-config Jun 7, 2023
### Release Notes

<details>
<summary>EndBug/add-and-commit</summary>

###
[`v9.1.3`](https://togithub.com/EndBug/add-and-commit/releases/tag/v9.1.3)

[Compare
Source](https://togithub.com/EndBug/add-and-commit/compare/v9.1.2...v9.1.3)

#### What's Changed

- chore(deps-dev): bump all-contributors-cli from 6.24.0 to 6.25.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/EndBug/add-and-commit/pull/504](https://togithub.com/EndBug/add-and-commit/pull/504)
- chore(deps): bump simple-git by
[@&#8203;EndBug](https://togithub.com/EndBug) in
[https://github.com/EndBug/add-and-commit/pull/505](https://togithub.com/EndBug/add-and-commit/pull/505)

**Full Changelog**:
EndBug/add-and-commit@v9.1.2...v9.1.3

###
[`v9.1.2`](https://togithub.com/EndBug/add-and-commit/releases/tag/v9.1.2)

[Compare
Source](https://togithub.com/EndBug/add-and-commit/compare/v9.1.1...v9.1.2)

#### What's Changed

- Update `io.ts` by [@&#8203;ggreif](https://togithub.com/ggreif) in
[https://github.com/EndBug/add-and-commit/pull/443](https://togithub.com/EndBug/add-and-commit/pull/443)
- docs: add ggreif as a contributor for maintenance by
[@&#8203;allcontributors](https://togithub.com/allcontributors) in
[https://github.com/EndBug/add-and-commit/pull/444](https://togithub.com/EndBug/add-and-commit/pull/444)
- chore(deps-dev): bump all-contributors-cli from 6.23.1 to 6.24.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/EndBug/add-and-commit/pull/445](https://togithub.com/EndBug/add-and-commit/pull/445)
- fix(io): add warning for pull input by
[@&#8203;EndBug](https://togithub.com/EndBug) in
[https://github.com/EndBug/add-and-commit/pull/453](https://togithub.com/EndBug/add-and-commit/pull/453)
- Fix a few typos in `README.md` by
[@&#8203;ggreif](https://togithub.com/ggreif) in
[https://github.com/EndBug/add-and-commit/pull/454](https://togithub.com/EndBug/add-and-commit/pull/454)
- docs: add ggreif as a contributor for doc by
[@&#8203;allcontributors](https://togithub.com/allcontributors) in
[https://github.com/EndBug/add-and-commit/pull/456](https://togithub.com/EndBug/add-and-commit/pull/456)
- Typo in `io.ts` debug output by
[@&#8203;ggreif](https://togithub.com/ggreif) in
[https://github.com/EndBug/add-and-commit/pull/455](https://togithub.com/EndBug/add-and-commit/pull/455)
- chore(deps-dev): bump husky from 8.0.1 to 8.0.2 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/EndBug/add-and-commit/pull/457](https://togithub.com/EndBug/add-and-commit/pull/457)
- chore(deps): bump minimatch from 3.0.4 to 3.1.2 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/EndBug/add-and-commit/pull/458](https://togithub.com/EndBug/add-and-commit/pull/458)
- chore(deps-dev): bump typescript from 4.8.4 to 4.9.3 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/EndBug/add-and-commit/pull/460](https://togithub.com/EndBug/add-and-commit/pull/460)
- chore(deps-dev): bump prettier from 2.7.1 to 2.8.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/EndBug/add-and-commit/pull/461](https://togithub.com/EndBug/add-and-commit/pull/461)
- chore(deps-dev): bump
[@&#8203;vercel/ncc](https://togithub.com/vercel/ncc) from 0.34.0 to
0.36.0 by [@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/EndBug/add-and-commit/pull/462](https://togithub.com/EndBug/add-and-commit/pull/462)
- chore(deps-dev): bump prettier from 2.8.0 to 2.8.1 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/EndBug/add-and-commit/pull/463](https://togithub.com/EndBug/add-and-commit/pull/463)
- chore(deps-dev): bump typescript from 4.9.3 to 4.9.4 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/EndBug/add-and-commit/pull/464](https://togithub.com/EndBug/add-and-commit/pull/464)
- chore(deps-dev): bump prettier from 2.8.1 to 2.8.2 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/EndBug/add-and-commit/pull/470](https://togithub.com/EndBug/add-and-commit/pull/470)
- chore(deps-dev): bump eslint-config-prettier from 8.5.0 to 8.6.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/EndBug/add-and-commit/pull/471](https://togithub.com/EndBug/add-and-commit/pull/471)
- chore(deps-dev): bump husky from 8.0.2 to 8.0.3 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/EndBug/add-and-commit/pull/472](https://togithub.com/EndBug/add-and-commit/pull/472)
- chore(deps-dev): bump prettier from 2.8.2 to 2.8.3 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/EndBug/add-and-commit/pull/474](https://togithub.com/EndBug/add-and-commit/pull/474)
- Add how to autodetect deleted files by
[@&#8203;azeemba](https://togithub.com/azeemba) in
[https://github.com/EndBug/add-and-commit/pull/468](https://togithub.com/EndBug/add-and-commit/pull/468)
- chore(deps-dev): bump
[@&#8203;vercel/ncc](https://togithub.com/vercel/ncc) from 0.36.0 to
0.36.1 by [@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/EndBug/add-and-commit/pull/475](https://togithub.com/EndBug/add-and-commit/pull/475)
- chore(deps-dev): bump typescript from 4.9.4 to 4.9.5 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/EndBug/add-and-commit/pull/477](https://togithub.com/EndBug/add-and-commit/pull/477)
- chore(deps-dev): bump prettier from 2.8.3 to 2.8.4 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/EndBug/add-and-commit/pull/480](https://togithub.com/EndBug/add-and-commit/pull/480)
- docs: add keithrfung as a contributor for doc by
[@&#8203;allcontributors](https://togithub.com/allcontributors) in
[https://github.com/EndBug/add-and-commit/pull/482](https://togithub.com/EndBug/add-and-commit/pull/482)
- chore(deps-dev): bump eslint-config-prettier from 8.6.0 to 8.7.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/EndBug/add-and-commit/pull/484](https://togithub.com/EndBug/add-and-commit/pull/484)
- chore(deps-dev): bump prettier from 2.8.4 to 2.8.5 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/EndBug/add-and-commit/pull/487](https://togithub.com/EndBug/add-and-commit/pull/487)
- chore(deps-dev): bump typescript from 4.9.5 to 5.0.2 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/EndBug/add-and-commit/pull/488](https://togithub.com/EndBug/add-and-commit/pull/488)
- chore(deps-dev): bump prettier from 2.8.5 to 2.8.7 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/EndBug/add-and-commit/pull/490](https://togithub.com/EndBug/add-and-commit/pull/490)
- chore(deps-dev): bump eslint-config-prettier from 8.7.0 to 8.8.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/EndBug/add-and-commit/pull/489](https://togithub.com/EndBug/add-and-commit/pull/489)
- chore(deps-dev): bump typescript from 5.0.2 to 5.0.3 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/EndBug/add-and-commit/pull/493](https://togithub.com/EndBug/add-and-commit/pull/493)
- chore(deps-dev): bump typescript from 5.0.3 to 5.0.4 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/EndBug/add-and-commit/pull/494](https://togithub.com/EndBug/add-and-commit/pull/494)
- chore(deps-dev): bump prettier from 2.8.7 to 2.8.8 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/EndBug/add-and-commit/pull/500](https://togithub.com/EndBug/add-and-commit/pull/500)
- fix: Abbreviate commit_sha to be back to being the short SHA by
[@&#8203;DenverCoder1](https://togithub.com/DenverCoder1) in
[https://github.com/EndBug/add-and-commit/pull/502](https://togithub.com/EndBug/add-and-commit/pull/502)
- docs: add DenverCoder1 as a contributor for bug, and code by
[@&#8203;allcontributors](https://togithub.com/allcontributors) in
[https://github.com/EndBug/add-and-commit/pull/503](https://togithub.com/EndBug/add-and-commit/pull/503)

#### New Contributors

- [@&#8203;ggreif](https://togithub.com/ggreif) made their first
contribution in
[https://github.com/EndBug/add-and-commit/pull/443](https://togithub.com/EndBug/add-and-commit/pull/443)
- [@&#8203;azeemba](https://togithub.com/azeemba) made their first
contribution in
[https://github.com/EndBug/add-and-commit/pull/468](https://togithub.com/EndBug/add-and-commit/pull/468)
- [@&#8203;DenverCoder1](https://togithub.com/DenverCoder1) made their
first contribution in
[https://github.com/EndBug/add-and-commit/pull/502](https://togithub.com/EndBug/add-and-commit/pull/502)

**Full Changelog**:
EndBug/add-and-commit@v9.1.1...v9.1.2

</details>
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.

commit_sha returns the full SHA instead of the 7-character SHA
2 participants