[PR #4960] [MERGED] Keys API changes #17568

Closed
opened 2025-11-02 14:06:56 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/4960
Author: @zeripath
Created: 9/19/2018
Status: Merged
Merged: 11/1/2018
Merged by: @techknowlogick

Base: masterHead: keys-api-changes


📝 Commits (5)

  • ad4160c Add private information to the user keys API
  • 8b85fee Add private information to the deploy keys api
  • 6bd8fb1 Add ability to search keys by fingerprint
  • a1baff5 Add integration test
  • ce53323 Merge branch 'master' into keys-api-changes

📊 Changes

6 files changed (+276 additions, -14 deletions)

View changed files

📝 integrations/api_keys_test.go (+102 -0)
📝 models/ssh_key.go (+30 -0)
📝 routers/api/v1/convert/convert.go (+8 -6)
📝 routers/api/v1/repo/key.go (+42 -2)
📝 routers/api/v1/user/key.go (+68 -6)
📝 templates/swagger/v1_json.tmpl (+26 -0)

📄 Description

The results of the API for both the repo ssh keys and the user ssh keys lacks several important features.

This pull request adjusts the API to allow reporting of the key id for the keys reported by /repos/{owner}/{repo}/keys and the owner, keytype and read_only type for the keys reported by /user/keys.

(Of note /user/keys does not only just return user keys but also deploy keys.)

NB: This pull request requires: https://github.com/go-gitea/go-sdk/pull/121


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/gitea/pull/4960 **Author:** [@zeripath](https://github.com/zeripath) **Created:** 9/19/2018 **Status:** ✅ Merged **Merged:** 11/1/2018 **Merged by:** [@techknowlogick](https://github.com/techknowlogick) **Base:** `master` ← **Head:** `keys-api-changes` --- ### 📝 Commits (5) - [`ad4160c`](https://github.com/go-gitea/gitea/commit/ad4160cbf0e38ba1b24b4c33c74dccc19c874b92) Add private information to the user keys API - [`8b85fee`](https://github.com/go-gitea/gitea/commit/8b85feef2cbecfcbd5d498bdafe7a5907f0e5c18) Add private information to the deploy keys api - [`6bd8fb1`](https://github.com/go-gitea/gitea/commit/6bd8fb17a4f6faf3338f354d8e52bb325ad5dd04) Add ability to search keys by fingerprint - [`a1baff5`](https://github.com/go-gitea/gitea/commit/a1baff51d2982cdbc8f0b972bea507f211d72f48) Add integration test - [`ce53323`](https://github.com/go-gitea/gitea/commit/ce53323f11227bddc8d2dc2d8a3ef2233b28f2cc) Merge branch 'master' into keys-api-changes ### 📊 Changes **6 files changed** (+276 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `integrations/api_keys_test.go` (+102 -0) 📝 `models/ssh_key.go` (+30 -0) 📝 `routers/api/v1/convert/convert.go` (+8 -6) 📝 `routers/api/v1/repo/key.go` (+42 -2) 📝 `routers/api/v1/user/key.go` (+68 -6) 📝 `templates/swagger/v1_json.tmpl` (+26 -0) </details> ### 📄 Description The results of the API for both the repo ssh keys and the user ssh keys lacks several important features. This pull request adjusts the API to allow reporting of the key id for the keys reported by `/repos/{owner}/{repo}/keys` and the owner, keytype and read_only type for the keys reported by `/user/keys`. (Of note `/user/keys` does not only just return user keys but also deploy keys.) NB: This pull request requires: https://github.com/go-gitea/go-sdk/pull/121 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 14:06:58 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#17568