Skip to content

Parse git commits and provide to step scripts as input #77

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

Open
wants to merge 11 commits into
base: alpha
Choose a base branch
from

Conversation

levibostian
Copy link
Owner

To make writing step scripts easier, provide more parsed details for a git commit. Previously it only had the title and date and hash. Now it has much, much more information.

Problem

When writing scripts, I noticed that I had to run git commands manually sometimes. I want to reduce the need to do that. So part of that is to parse git commits for you!

Solution

Testing

  • Added automated tests.
  • Manually tested. If you check this box, provide instructions for others to test, too.

Notes for reviewers

To make writing step scripts easier, provide more parsed details for a git commit. Previously it only had the title and date and hash. Now it has much, much more information.
makes writing scripts more convenient. Less of a chance you need to write git commands on your own.
we removed the feature to commit files after you run your deploy script but forgot to modify this script.
Copy link

github-actions bot commented Aug 3, 2025

decaf

Running deployments in test mode. Results will appear below.
If this pull request and all of it's parent pull requests are merged using the...

...🟩 merge 🟩 merge method... 🚢 The next version of the project will be: 1.0.0-alpha.15

Learn more
Latest release: 1.0.0-alpha.14
Commit of latest release: cff47bb

Commits since last release:
- Merge pull request #77 from parse-commits
- TEMP re-run the timing test for parsing commits
- feat: for performance, you can filter the list of branches that are parsed and provided as input to steps

I did some performance testing with a couple repositories, big and small, and found that the default behavior of Parsing every command in every branch of the repository for some projects indeed would take just way too long. So this is a feature that allows you to filter the branches for big projects to still be able to use this tool.
- TEMP write a timing test for parsing all commits all branches
- feat: get list of all commits from remote branches as well as local

in my get latest release step script, I expect to see "latest" branch. but it's not showing up. That's because when I run my git module function for getting all local branches, it only gets list of branches that exist locally but "git fetch" doesn't create local branches. So modified the code to get remote and also local branches.
- TEMP enable debug logs on GH

its currently broken. turned on just to debug
- add logging to get latest release step to help with debugging
- change the delimiter symbol in git log to something that a human probably will not use

during testing I realized that pipe characters are common to put into commit messages and it broke the code.
- feat: add an abbreviated git commit sha to the parsed git commits
- refactor: delete unused DeployCommandOutput code

we removed the feature to commit files after you run your deploy script but forgot to modify this script.
- feat: parse all git commits for all local branches

makes writing scripts more convenient. Less of a chance you need to write git commands on your own.
- feat: provide more git commit details as input to steps

To make writing step scripts easier, provide more parsed details for a git commit. Previously it only had the title and date and hash. Now it has much, much more information.
- Merge pull request #77 from parse-commits
- TEMP re-run the timing test for parsing commits
- feat: for performance, you can filter the list of branches that are parsed and provided as input to steps

I did some performance testing with a couple repositories, big and small, and found that the default behavior of Parsing every command in every branch of the repository for some projects indeed would take just way too long. So this is a feature that allows you to filter the branches for big projects to still be able to use this tool.
- TEMP write a timing test for parsing all commits all branches
- feat: get list of all commits from remote branches as well as local

in my get latest release step script, I expect to see "latest" branch. but it's not showing up. That's because when I run my git module function for getting all local branches, it only gets list of branches that exist locally but "git fetch" doesn't create local branches. So modified the code to get remote and also local branches.
- TEMP enable debug logs on GH

its currently broken. turned on just to debug
- add logging to get latest release step to help with debugging
- change the delimiter symbol in git log to something that a human probably will not use

during testing I realized that pipe characters are common to put into commit messages and it broke the code.
- feat: add an abbreviated git commit sha to the parsed git commits
- refactor: delete unused DeployCommandOutput code

we removed the feature to commit files after you run your deploy script but forgot to modify this script.
- feat: parse all git commits for all local branches

makes writing scripts more convenient. Less of a chance you need to write git commands on your own.
- feat: provide more git commit details as input to steps

To make writing step scripts easier, provide more parsed details for a git commit. Previously it only had the title and date and hash. Now it has much, much more information.

decaf

Running deployments in test mode. Results will appear below.
If this pull request and all of it's parent pull requests are merged using the...

...🟩 squash 🟩 merge method... 🌴 It will not trigger a deployment. No new version will be deployed.

Learn more
Latest release: none, this is the first release.
Commit of latest release: none, this is the first release.

Commits since last release:
- none

decaf

Running deployments in test mode. Results will appear below.
If this pull request and all of it's parent pull requests are merged using the...

...🟩 rebase 🟩 merge method... 🚢 The next version of the project will be: 1.0.0-alpha.15

Learn more
Latest release: 1.0.0-alpha.14
Commit of latest release: cff47bb

Commits since last release:
- TEMP re-run the timing test for parsing commits
- feat: for performance, you can filter the list of branches that are parsed and provided as input to steps

I did some performance testing with a couple repositories, big and small, and found that the default behavior of Parsing every command in every branch of the repository for some projects indeed would take just way too long. So this is a feature that allows you to filter the branches for big projects to still be able to use this tool.
- TEMP write a timing test for parsing all commits all branches
- feat: get list of all commits from remote branches as well as local

in my get latest release step script, I expect to see "latest" branch. but it's not showing up. That's because when I run my git module function for getting all local branches, it only gets list of branches that exist locally but "git fetch" doesn't create local branches. So modified the code to get remote and also local branches.
- TEMP enable debug logs on GH

its currently broken. turned on just to debug
- add logging to get latest release step to help with debugging
- change the delimiter symbol in git log to something that a human probably will not use

during testing I realized that pipe characters are common to put into commit messages and it broke the code.
- feat: add an abbreviated git commit sha to the parsed git commits
- refactor: delete unused DeployCommandOutput code

we removed the feature to commit files after you run your deploy script but forgot to modify this script.
- feat: parse all git commits for all local branches

makes writing scripts more convenient. Less of a chance you need to write git commands on your own.
- feat: provide more git commit details as input to steps

To make writing step scripts easier, provide more parsed details for a git commit. Previously it only had the title and date and hash. Now it has much, much more information.
- TEMP re-run the timing test for parsing commits
- feat: for performance, you can filter the list of branches that are parsed and provided as input to steps

I did some performance testing with a couple repositories, big and small, and found that the default behavior of Parsing every command in every branch of the repository for some projects indeed would take just way too long. So this is a feature that allows you to filter the branches for big projects to still be able to use this tool.
- TEMP write a timing test for parsing all commits all branches
- feat: get list of all commits from remote branches as well as local

in my get latest release step script, I expect to see "latest" branch. but it's not showing up. That's because when I run my git module function for getting all local branches, it only gets list of branches that exist locally but "git fetch" doesn't create local branches. So modified the code to get remote and also local branches.
- TEMP enable debug logs on GH

its currently broken. turned on just to debug
- add logging to get latest release step to help with debugging
- change the delimiter symbol in git log to something that a human probably will not use

during testing I realized that pipe characters are common to put into commit messages and it broke the code.
- feat: add an abbreviated git commit sha to the parsed git commits
- refactor: delete unused DeployCommandOutput code

we removed the feature to commit files after you run your deploy script but forgot to modify this script.
- feat: parse all git commits for all local branches

makes writing scripts more convenient. Less of a chance you need to write git commands on your own.
- feat: provide more git commit details as input to steps

To make writing step scripts easier, provide more parsed details for a git commit. Previously it only had the title and date and hash. Now it has much, much more information.

…ably will not use

during testing I realized that pipe characters are common to put into commit messages and it broke the code.
its currently broken. turned on just to debug
in my get latest release step script, I expect to see "latest" branch. but it's not showing up. That's because when I run my git module function for getting all local branches, it only gets list of branches that exist locally but "git fetch" doesn't create local branches. So modified the code to get remote and also local branches.
@coveralls
Copy link

coveralls commented Aug 4, 2025

Pull Request Test Coverage Report for Build 16749551714

Details

  • 130 of 146 (89.04%) changed or added relevant lines in 6 files are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+3.6%) to 70.847%

Changes Missing Coverage Covered Lines Changed/Added Lines %
lib/git.ts 106 122 86.89%
Files with Coverage Reduction New Missed Lines %
lib/log.ts 2 77.36%
Totals Coverage Status
Change from base Build 16320131651: 3.6%
Covered Lines: 769
Relevant Lines: 1091

💛 - Coveralls

@levibostian levibostian force-pushed the parse-commits branch 5 times, most recently from 98f977a to 8696306 Compare August 5, 2025 12:04
…arsed and provided as input to steps

I did some performance testing with a couple repositories, big and small, and found that the default behavior of Parsing every command in every branch of the repository for some projects indeed would take just way too long. So this is a feature that allows you to filter the branches for big projects to still be able to use this tool.
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.

2 participants