mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 21:28:11 +09:00 
			
		
		
		
	Extend the API to include more repository properties (#3249)
Adds description, stars_count, forks_count, watchers_count and open_issues_count.
This commit is contained in:
		| @@ -45,11 +45,16 @@ func ToRepository(owner *models.User, repo *models.Repository, permission api.Pe | ||||
| 		ID:          repo.ID, | ||||
| 		Owner:       ToUser(owner), | ||||
| 		FullName:    owner.Name + "/" + repo.Name, | ||||
| 		Description: repo.Description, | ||||
| 		Private:     repo.IsPrivate, | ||||
| 		Fork:        repo.IsFork, | ||||
| 		HtmlUrl:     setting.AppUrl + owner.Name + "/" + repo.Name, | ||||
| 		CloneUrl:    cl.HTTPS, | ||||
| 		SshUrl:      cl.SSH, | ||||
| 		OpenIssues:  repo.NumOpenIssues, | ||||
| 		Stars:       repo.NumStars, | ||||
| 		Forks:       repo.NumForks, | ||||
| 		Watchers:    repo.NumWatches, | ||||
| 		Permissions: permission, | ||||
| 	} | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user