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

GHRepository: allows creating deploy keys being read-only #1625

Merged
merged 3 commits into from Mar 20, 2023
Merged

GHRepository: allows creating deploy keys being read-only #1625

merged 3 commits into from Mar 20, 2023

Conversation

MarcelHB
Copy link
Contributor

@MarcelHB MarcelHB commented Mar 8, 2023

Description

See request in #1592, this PR adds the ability to create a deploy key set to read-only. I've left the previous addDeployKey as-is and added an override.

Related API Documentation, but it's trivial: https://docs.github.com/en/rest/deploy-keys?apiVersion=2022-11-28#create-a-deploy-key

fixes #1592

@codecov
Copy link

codecov bot commented Mar 20, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.21 🎉

Comparison is base (600933b) 79.64% compared to head (7cce5da) 79.86%.

❗ Current head 7cce5da differs from pull request most recent head 177c386. Consider uploading reports for the commit 177c386 to get more accurate results

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1625      +/-   ##
============================================
+ Coverage     79.64%   79.86%   +0.21%     
- Complexity     2187     2191       +4     
============================================
  Files           208      208              
  Lines          6657     6659       +2     
  Branches        364      364              
============================================
+ Hits           5302     5318      +16     
+ Misses         1141     1127      -14     
  Partials        214      214              
Impacted Files Coverage Δ
src/main/java/org/kohsuke/github/GHRepository.java 71.59% <100.00%> (+1.13%) ⬆️

... and 1 file with indirect coverage changes

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 in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@bitwiseman bitwiseman left a comment

Choose a reason for hiding this comment

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

Solid work, thanks!
I used your test data to also test the old addDeloyKey method.

@bitwiseman bitwiseman merged commit afe6732 into hub4j:main Mar 20, 2023
@MarcelHB MarcelHB deleted the issue-1592/create_deploy_key_ro branch March 20, 2023 19:35
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.

Enhancement: GHRepository addDeployKey - Possibility to add a key as read only
2 participants