Merge branch 'master' into master
This commit is contained in:
commit
8735bc2f82
|
|
@ -60,8 +60,8 @@ var (
|
||||||
issueTasksDonePat *regexp.Regexp
|
issueTasksDonePat *regexp.Regexp
|
||||||
)
|
)
|
||||||
|
|
||||||
const issueTasksRegexpStr = `(^\s*-\s\[[\sx]\]\s)|(\n\s*-\s\[[\sx]\]\s)`
|
const issueTasksRegexpStr = `(^\s*[-*]\s\[[\sx]\]\s.)|(\n\s*[-*]\s\[[\sx]\]\s.)`
|
||||||
const issueTasksDoneRegexpStr = `(^\s*-\s\[[x]\]\s)|(\n\s*-\s\[[x]\]\s)`
|
const issueTasksDoneRegexpStr = `(^\s*[-*]\s\[[x]\]\s.)|(\n\s*[-*]\s\[[x]\]\s.)`
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
issueTasksPat = regexp.MustCompile(issueTasksRegexpStr)
|
issueTasksPat = regexp.MustCompile(issueTasksRegexpStr)
|
||||||
|
|
@ -248,7 +248,7 @@ func (issue *Issue) GetIsRead(userID int64) error {
|
||||||
|
|
||||||
// APIURL returns the absolute APIURL to this issue.
|
// APIURL returns the absolute APIURL to this issue.
|
||||||
func (issue *Issue) APIURL() string {
|
func (issue *Issue) APIURL() string {
|
||||||
return issue.Repo.APIURL() + "/" + path.Join("issues", fmt.Sprint(issue.ID))
|
return issue.Repo.APIURL() + "/" + path.Join("issues", fmt.Sprint(issue.Index))
|
||||||
}
|
}
|
||||||
|
|
||||||
// HTMLURL returns the absolute URL to this issue.
|
// HTMLURL returns the absolute URL to this issue.
|
||||||
|
|
|
||||||
161
public/swagger.v1.json
vendored
161
public/swagger.v1.json
vendored
File diff suppressed because it is too large
Load Diff
|
|
@ -77,9 +77,9 @@ func ListIssues(ctx *context.APIContext) {
|
||||||
|
|
||||||
// GetIssue get an issue of a repository
|
// GetIssue get an issue of a repository
|
||||||
func GetIssue(ctx *context.APIContext) {
|
func GetIssue(ctx *context.APIContext) {
|
||||||
// swagger:operation GET /repos/{owner}/{repo}/issues/{id} issue issueGetIssue
|
// swagger:operation GET /repos/{owner}/{repo}/issues/{index} issue issueGetIssue
|
||||||
// ---
|
// ---
|
||||||
// summary: Get an issue by id
|
// summary: Get an issue
|
||||||
// produces:
|
// produces:
|
||||||
// - application/json
|
// - application/json
|
||||||
// parameters:
|
// parameters:
|
||||||
|
|
@ -93,9 +93,9 @@ func GetIssue(ctx *context.APIContext) {
|
||||||
// description: name of the repo
|
// description: name of the repo
|
||||||
// type: string
|
// type: string
|
||||||
// required: true
|
// required: true
|
||||||
// - name: id
|
// - name: index
|
||||||
// in: path
|
// in: path
|
||||||
// description: id of the issue to get
|
// description: index of the issue to get
|
||||||
// type: integer
|
// type: integer
|
||||||
// required: true
|
// required: true
|
||||||
// responses:
|
// responses:
|
||||||
|
|
@ -190,7 +190,7 @@ func CreateIssue(ctx *context.APIContext, form api.CreateIssueOption) {
|
||||||
|
|
||||||
// EditIssue modify an issue of a repository
|
// EditIssue modify an issue of a repository
|
||||||
func EditIssue(ctx *context.APIContext, form api.EditIssueOption) {
|
func EditIssue(ctx *context.APIContext, form api.EditIssueOption) {
|
||||||
// swagger:operation PATCH /repos/{owner}/{repo}/issues/{id} issue issueEditIssue
|
// swagger:operation PATCH /repos/{owner}/{repo}/issues/{index} issue issueEditIssue
|
||||||
// ---
|
// ---
|
||||||
// summary: Edit an issue
|
// summary: Edit an issue
|
||||||
// consumes:
|
// consumes:
|
||||||
|
|
@ -208,9 +208,9 @@ func EditIssue(ctx *context.APIContext, form api.EditIssueOption) {
|
||||||
// description: name of the repo
|
// description: name of the repo
|
||||||
// type: string
|
// type: string
|
||||||
// required: true
|
// required: true
|
||||||
// - name: id
|
// - name: index
|
||||||
// in: path
|
// in: path
|
||||||
// description: id of the issue to edit
|
// description: index of the issue to edit
|
||||||
// type: integer
|
// type: integer
|
||||||
// required: true
|
// required: true
|
||||||
// - name: body
|
// - name: body
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user