Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Add expires_at field when creating project deploy keys #2054

Merged
merged 2 commits into from
Nov 5, 2024

Conversation

heidiberry
Copy link
Contributor

@heidiberry heidiberry commented Nov 2, 2024

Fixes #2020

The code in this area was a bit confusing. There are two similar endpoints:

The code linked to the documentation for the first one and was named like it was the first one, but it was actually the second one.

I've updated the documentation link, but adding support for the first one will be difficult in future given it's name is already taken.

deploy_keys.go Outdated
Key *string `url:"key,omitempty" json:"key,omitempty"`
Title *string `url:"title,omitempty" json:"title,omitempty"`
CanPush *bool `url:"can_push,omitempty" json:"can_push,omitempty"`
ExpiresAt *ISOTime `url:"expires_at,omitempty" json:"expires_at,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

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

ISOTime is actually only used for parts where only the data is required (in hindsight it should have been called ISODate I guess). So this needs to be:

Suggested change
ExpiresAt *ISOTime `url:"expires_at,omitempty" json:"expires_at,omitempty"`
ExpiresAt *time.Time `url:"expires_at,omitempty" json:"expires_at,omitempty"`

Copy link
Member

@svanharmelen svanharmelen left a comment

Choose a reason for hiding this comment

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

I fixed it so it can be merged... Thanks!

@svanharmelen svanharmelen merged commit e5d92f6 into xanzy:main Nov 5, 2024
3 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deploy keys is misssing expires_at
2 participants