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

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 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.

Deploy keys is misssing expires_at
2 participants