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

add timestamp to commit datasource #111

Merged
merged 3 commits into from
Jan 3, 2024

Conversation

pgaubatz
Copy link
Contributor

@pgaubatz pgaubatz commented Jan 2, 2024

This small addition exposes the timestamp of a commit as an RFC3339 formatted string.

Copy link
Owner

@ethanmdavidson ethanmdavidson left a comment

Choose a reason for hiding this comment

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

Hi @pgaubatz, thanks for the contribution! There's just one little piece missing for the tests.

@@ -23,6 +23,7 @@ build {
"echo 'num_branches: ${length(data.git-commit.test.branches)}'",
"echo 'author: ${data.git-commit.test.author}'",
"echo 'committer: ${data.git-commit.test.committer}'",
"echo 'timestamp: ${data.git-commit.test.timestamp}'",
Copy link
Owner

Choose a reason for hiding this comment

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

Can you please also add the timestamp line to the acceptance tests? You just need to create a regex to match the line with the timestamp, and then use it in the checkMatch function. See the commit message regex and commit message check as an example.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks for the feedback. I just added the missing lines in 94574c9

Copy link
Owner

@ethanmdavidson ethanmdavidson left a comment

Choose a reason for hiding this comment

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

looks good, thanks again! I'll cut a release v0.6.0 shortly

@ethanmdavidson ethanmdavidson merged commit 5cee619 into ethanmdavidson:main Jan 3, 2024
1 check passed
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