-
Notifications
You must be signed in to change notification settings - Fork 711
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 created_at and last_used fields to DeployKey. #1593
Add created_at and last_used fields to DeployKey. #1593
Conversation
Codecov ReportBase: 79.22% // Head: 79.28% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #1593 +/- ##
============================================
+ Coverage 79.22% 79.28% +0.05%
- Complexity 2141 2151 +10
============================================
Files 206 206
Lines 6576 6595 +19
Branches 364 364
============================================
+ Hits 5210 5229 +19
Misses 1154 1154
Partials 212 212
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Looking good. Please include in testing. |
Will do @bitwiseman . I've requested access to the testing organization here: #1602 |
Wiremocks pending once access to hub4j-test-org is granted.
@bitwiseman I've added functionality to add public keys to the user in this PR as well. I've added test cases for the things added by this PR. I need to create wiremocks and update a few assertions once I'm able to create the test repository in the hub4j-test-org organization. |
@van-vliet |
…ted key timestamps to match the ones in that repo. Snapshotted the wiremocks.
…e test uses them.
The test are ready. @bitwiseman Can you approve the CI builds so that we can see whether the tests pass on the CI server and whether code coverage is high enough. |
…ue to missing documentation.
Use a constant public key since it is not added to the actual users account unless someone actively decides to refresh the snapshot.
Tests should work without use of proxy. Javadoc warnings that caused the site to fail have also been fixed. @bitwiseman can you approve running the CI tests? |
(hopefully) one last time please. |
… Updated wiremocks and test cases to verify the last used date.
Code coverage should be fixed now as well. Please try again. |
@bitwiseman can you trigger the CI builds again? Also, it seems
can only be enabled if the PR comes from a personal account. This PR comes from my work organization. Do I need to recreate the PR from my personal account instead? |
Recreated PR from personal account to allow enabling "Allow edits from maintainers": |
https://docs.github.com/en/rest/deploy-keys?apiVersion=2022-11-28#get-a-deploy-key
Description
I need to rotate all GH deploy keys that are older than a certain age. Today that is not possible since the created date is not part of the Deploy Key class. This PR adds the created_at and last_used fields to allow users to read these values.
Before submitting a PR:
mvn -D enable-ci clean install site
locally. If this command doesn't succeed, your change will not pass CI.main
. You will create your PR from that branch.When creating a PR:
There are no tests for deploy keys at all. Since this PR only adds to fields, I haven't added any.
I followed the description here but the "Allow edits from maintainers" checkbox is not visible.