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

Include timestamp and author for approved packagerevisions in the API #3481

Merged
merged 2 commits into from Aug 27, 2022

Conversation

mortent
Copy link
Contributor

@mortent mortent commented Aug 22, 2022

This PR exposes the time and author for published packagerevisions. They are exposed as the new fields publishedBy and publishedAs on the status object of the packagerevision resource.

For published packages on a git tag, we fetch the author and timestamp from the latest commit on the tag. For packages on the main branch, we can't assume that the last commit is related to the package in question, so we scan through the git commit log to find the latest commit for the specific package, by looking for the gitAnnotations. If we can't find any annotations for the package, we just leave the fields empty.

This still needs a few more tests, but wanted feedback on the API changes.

@mortent
Copy link
Contributor Author

mortent commented Aug 24, 2022

I will add some more tests on this before merging.

@mortent mortent changed the title [WIP] Include timestamp and author for approved packagerevisions in the API Include timestamp and author for approved packagerevisions in the API Aug 27, 2022
@mortent mortent merged commit 3bdd180 into kptdev:main Aug 27, 2022
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.

None yet

2 participants