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 create_at and updated_at in PR json #1616

Merged
merged 1 commit into from Apr 27, 2017
Merged

Conversation

cez81
Copy link
Contributor

@cez81 cez81 commented Apr 26, 2017

Add fields created_at and updated_at in PR json.

Depends on go-gitea/go-sdk#52. Needs vendor update before merge!

Fixes #907

models/pull.go Outdated
@@ -209,6 +209,9 @@ func (pr *PullRequest) APIFormat() *api.PullRequest {
apiPullRequest.MergedBy = pr.Merger.APIFormat()
}

apiPullRequest.Created = &pr.Issue.Created
Copy link
Member

Choose a reason for hiding this comment

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

This and next line should be at object creation at L199.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, still new to Go :)

@lunny lunny added this to the 1.2.0 milestone Apr 27, 2017
@lunny lunny added type/bug modifies/api This PR adds API routes or modifies them labels Apr 27, 2017
 * Move new fields to object creation (use reference)
 * Vendor: Update SDK
@cez81
Copy link
Contributor Author

cez81 commented Apr 27, 2017

All done please review :)

@tboerger tboerger added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Apr 27, 2017
@lunny
Copy link
Member

lunny commented Apr 27, 2017

LGTM

@tboerger tboerger added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Apr 27, 2017
@sapk
Copy link
Member

sapk commented Apr 27, 2017

LGTM

@tboerger tboerger added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Apr 27, 2017
@lunny lunny merged commit e4a0a04 into go-gitea:master Apr 27, 2017
@cez81 cez81 deleted the api_pr_times branch April 27, 2017 09:46
@go-gitea go-gitea locked and limited conversation to collaborators Nov 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/api This PR adds API routes or modifies them type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pull Requests JSON objects (API, Hooks) do not contain created_at and updated_at
4 participants