mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 02:46:04 +01:00 
			
		
		
		
	[API] Add affected files of commits to commit struct (#14579)
* Add files affected by a commit to gitea API -- similar to github * Add files affected by a commit to gitea API * Fix stupid error * Fix other stupid typo * Generate swagger tmpl * Comply with convert to git commit refacto * update swagger docs * extend test * format code * Update integrations/api_repo_git_commits_test.go * Update modules/convert/git_commit.go Co-authored-by: Laurent Cahour <laurent.cahour@dont-nod.com> Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
		| @@ -42,11 +42,12 @@ type RepoCommit struct { | ||||
| // Commit contains information generated from a Git commit. | ||||
| type Commit struct { | ||||
| 	*CommitMeta | ||||
| 	HTMLURL    string        `json:"html_url"` | ||||
| 	RepoCommit *RepoCommit   `json:"commit"` | ||||
| 	Author     *User         `json:"author"` | ||||
| 	Committer  *User         `json:"committer"` | ||||
| 	Parents    []*CommitMeta `json:"parents"` | ||||
| 	HTMLURL    string                 `json:"html_url"` | ||||
| 	RepoCommit *RepoCommit            `json:"commit"` | ||||
| 	Author     *User                  `json:"author"` | ||||
| 	Committer  *User                  `json:"committer"` | ||||
| 	Parents    []*CommitMeta          `json:"parents"` | ||||
| 	Files      []*CommitAffectedFiles `json:"files"` | ||||
| } | ||||
|  | ||||
| // CommitDateOptions store dates for GIT_AUTHOR_DATE and GIT_COMMITTER_DATE | ||||
| @@ -56,3 +57,8 @@ type CommitDateOptions struct { | ||||
| 	// swagger:strfmt date-time | ||||
| 	Committer time.Time `json:"committer"` | ||||
| } | ||||
|  | ||||
| // CommitAffectedFiles store information about files affected by the commit | ||||
| type CommitAffectedFiles struct { | ||||
| 	Filename string `json:"filename"` | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user