You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Enhance git hours to default to first and latest commit dates #2
the git hours syntax needs to manually supply the before string and the since string. i know there are git commands that can get the date and time of the latest commit and the very first commit of a code base. can we work towards this feature where we just need to type git hours and by default it gets the date and time of the first commit and the latest.
Agent Context
[
"Locate argument parsing: Identify where `program.option` is used to define the `since` and `until` arguments in `src/index.js`. This will help understand how arguments are currently processed.",
"Implement `getFirstCommitDate` and `getLatestCommitDate` functions: Create two new asynchronous functions in `src/index.js` that use `nodegit` to retrieve the date of the very first commit and the latest commit, respectively. These functions will take the `repo` object as an argument.",
"Modify argument processing logic: In `src/index.js`, update the argument parsing logic to check if `since` or `until` options were provided by the user. If not, call the newly created `getFirstCommitDate` and `getLatestCommitDate` functions to set the default values for `config.since` and `config.until`. This will likely involve modifying the `parseArgs` function or the section where `config.since` and `config.until` are set after argument parsing.",
"Integrate date retrieval into `main`: Ensure that the `getFirstCommitDate` and `getLatestCommitDate` functions are called *before* `getCommits` if the `since` or `until` options are not explicitly provided by the user. This will involve opening the repository to get the commit dates."
]
I've generated a plan for this issue and it's ready for your review.
Plan: Enhance git hours to default to first and latest commit dates
Task 1:
Locate argument parsing: Identify where `program.option` is used to define the `since` and `until` arguments in `src/index.js`. This will help understand how arguments are currently processed.
Task 2:
Implement `getFirstCommitDate` and `getLatestCommitDate` functions: Create two new asynchronous functions in `src/index.js` that use `nodegit` to retrieve the date of the very first commit and the latest commit, respectively. These functions will take the `repo` object as an argument.
Task 3:
Modify argument processing logic: In `src/index.js`, update the argument parsing logic to check if `since` or `until` options were provided by the user. If not, call the newly created `getFirstCommitDate` and `getLatestCommitDate` functions to set the default values for `config.since` and `config.until`. This will likely involve modifying the `parseArgs` function or the section where `config.since` and `config.until` are set after argument parsing.
Task 4:
Integrate date retrieval into `main`: Ensure that the `getFirstCommitDate` and `getLatestCommitDate` functions are called *before* `getCommits` if the `since` or `until` options are not explicitly provided by the user. This will involve opening the repository to get the commit dates.
Please review the plan and let me know if you'd like me to proceed, make changes, or if you have any feedback.
🟠 Plan Ready for Approval 🟠
I've generated a plan for this issue and it's ready for your review.
Plan: Enhance git hours to default to first and latest commit dates
Task 1:
Locate argument parsing: Identify where `program.option` is used to define the `since` and `until` arguments in `src/index.js`. This will help understand how arguments are currently processed.
Task 2:
Implement `getFirstCommitDate` and `getLatestCommitDate` functions: Create two new asynchronous functions in `src/index.js` that use `nodegit` to retrieve the date of the very first commit and the latest commit, respectively. These functions will take the `repo` object as an argument.
Task 3:
Modify argument processing logic: In `src/index.js`, update the argument parsing logic to check if `since` or `until` options were provided by the user. If not, call the newly created `getFirstCommitDate` and `getLatestCommitDate` functions to set the default values for `config.since` and `config.until`. This will likely involve modifying the `parseArgs` function or the section where `config.since` and `config.until` are set after argument parsing.
Task 4:
Integrate date retrieval into `main`: Ensure that the `getFirstCommitDate` and `getLatestCommitDate` functions are called *before* `getCommits` if the `since` or `until` options are not explicitly provided by the user. This will involve opening the repository to get the commit dates.
Please review the plan and let me know if you'd like me to proceed, make changes, or if you have any feedback.
Activity
robin-agent commentedon Aug 7, 2025
🟠 Plan Ready for Approval 🟠
I've generated a plan for this issue and it's ready for your review.
Plan: Enhance
git hoursto default to first and latest commit datesPlease review the plan and let me know if you'd like me to proceed, make changes, or if you have any feedback.
🟠 Plan Ready for Approval 🟠
I've generated a plan for this issue and it's ready for your review.
Plan: Enhance
git hoursto default to first and latest commit datesPlease review the plan and let me know if you'd like me to proceed, make changes, or if you have any feedback.