feat(keys): add missing fields to SSHKey and Key

What

  • SSHKey: add LastUsedAt.
  • Key: add ExpiresAt, LastUsedAt and UsageType.

Tests

  • TestGetKeyWithUser now asserts the three new Key fields.
  • TestGetSSHKey_LastUsedAt covers a used key and one with last_used_at: null. GetSSHKey had no test before.

Closes #2314 (closed)

GitLab API docs: https://docs.gitlab.com/api/keys/

Merge request reports

Loading
Loading