Compare commits
109 Commits
dev_miroco
...
release/v1
Author | SHA1 | Date |
---|---|---|
Lunny Xiao | 4d876ab1c8 | 5 years ago |
Lunny Xiao | f58715d903 | 5 years ago |
Lunny Xiao | 81072af8ce | 5 years ago |
guillep2k | 1d7a855d66 | 5 years ago |
zeripath | 3c8842d58c | 5 years ago |
Lunny Xiao | e786f098d5 | 5 years ago |
Lunny Xiao | 22dec1cea6 | 5 years ago |
Lunny Xiao | 0c5e2e2e4c | 5 years ago |
Lunny Xiao | 158b716387 | 5 years ago |
John Olheiser | e611dbbe86 | 5 years ago |
dioss-Machiel | 68bca621cd | 5 years ago |
Lunny Xiao | c4e0f717e7 | 5 years ago |
zeripath | e3e024876e | 5 years ago |
6543 | cebc125f7f | 5 years ago |
6543 | c975287149 | 5 years ago |
Lunny Xiao | b31068652a | 5 years ago |
Lunny Xiao | 918e640590 | 5 years ago |
Lunny Xiao | 9809fe27c4 | 5 years ago |
Lunny Xiao | ed6a2f2e2e | 5 years ago |
Lunny Xiao | a0435fcd63 | 5 years ago |
David Svantesson | a2e2045a96 | 5 years ago |
Lauris BH | b67a023bec | 5 years ago |
Lauris BH | b1a90f7286 | 5 years ago |
Lauris BH | 45c8a3aeeb | 5 years ago |
zeripath | 0e5126da22 | 5 years ago |
zeripath | cd3e52d91b | 5 years ago |
zeripath | 319c92163f | 5 years ago |
6543 | a15a644c05 | 5 years ago |
6543 | 2ccd92407a | 5 years ago |
6543 | 17c691f8aa | 5 years ago |
6543 | cb3fe4cbf1 | 5 years ago |
6543 | c63a80138a | 5 years ago |
6543 | b4b8c9679f | 5 years ago |
Lunny Xiao | c0bb5ebc15 | 5 years ago |
Lunny Xiao | 9409ac9030 | 5 years ago |
Lunny Xiao | a3928fd820 | 5 years ago |
Brad Albright | f0bda12c49 | 5 years ago |
Brad Albright | 58c38ab4b6 | 5 years ago |
John Olheiser | a276aaf61e | 5 years ago |
mrsdizzie | e03934f035 | 5 years ago |
Cornel | 3a14a69e8a | 5 years ago |
zeripath | f0f48e0fff | 5 years ago |
Lunny Xiao | 1aeeaa8e89 | 5 years ago |
Lunny Xiao | eb8d5f6aff | 5 years ago |
John Olheiser | 9ef148abeb | 5 years ago |
6543 | f11df80058 | 5 years ago |
6543 | 59913f405c | 5 years ago |
6543 | 42dae399eb | 5 years ago |
6543 | f36efe0b54 | 5 years ago |
Lunny Xiao | 38664d7f39 | 5 years ago |
Lunny Xiao | c4e52d232e | 5 years ago |
zeripath | 2b257a91de | 5 years ago |
Benno | c01afd584d | 5 years ago |
guillep2k | 1270e2ad85 | 5 years ago |
Lunny Xiao | 29fa3a0f68 | 5 years ago |
Koichi MATSUMOTO | 65a573f3c7 | 5 years ago |
Jordan | ade5ec5aa7 | 5 years ago |
techknowlogick | 38ce87a61a | 5 years ago |
guillep2k | 261b19ced7 | 5 years ago |
Antoine GIRARD | 6ef0ab4d96 | 5 years ago |
guillep2k | ecdb4c1750 | 5 years ago |
zeripath | a0e76de75a | 5 years ago |
6543 | 880f26c7f0 | 5 years ago |
Lunny Xiao | fd461ca555 | 5 years ago |
zeripath | 3487fb66a1 | 5 years ago |
John Olheiser | 1122230d0e | 5 years ago |
John Olheiser | 9619ccf0e5 | 5 years ago |
guillep2k | 023ae3c48c | 5 years ago |
John Olheiser | 3227a11f71 | 5 years ago |
zeripath | 3497efac4a | 5 years ago |
mrsdizzie | 43fc99a7ed | 5 years ago |
guillep2k | 8693e54426 | 5 years ago |
zeripath | b27cac021f | 5 years ago |
guillep2k | ca69ded83e | 5 years ago |
guillep2k | fbcf235633 | 5 years ago |
guillep2k | 1275c88589 | 5 years ago |
mrsdizzie | 42d0efd1f3 | 5 years ago |
Lauris BH | 68b7f9f3f7 | 5 years ago |
Lauris BH | 26457782c1 | 5 years ago |
Lauris BH | 1c65ecc1c6 | 5 years ago |
6543 | c5e5063ec9 | 5 years ago |
6543 | b040a87665 | 5 years ago |
Lunny Xiao | 2236375d66 | 5 years ago |
zeripath | 646fd8b570 | 5 years ago |
zeripath | 4dac8b2389 | 5 years ago |
John Olheiser | 3341aaf3f0 | 5 years ago |
John Olheiser | e766f11bd3 | 5 years ago |
6543 | 432f9dd1a3 | 5 years ago |
David Svantesson | 8caf05989f | 5 years ago |
Monty Taylor | 9bde52ffc1 | 5 years ago |
jaqra | fa03af8456 | 5 years ago |
Lunny Xiao | 14ebda6fd5 | 5 years ago |
zeripath | 1d10747514 | 5 years ago |
John Olheiser | 83c90e9ba0 | 5 years ago |
John Olheiser | 2fbd5ae2e5 | 5 years ago |
guillep2k | 0032278a46 | 5 years ago |
guillep2k | ccf5298a2c | 5 years ago |
zeripath | ece768ab6e | 5 years ago |
guillep2k | bac9424a62 | 5 years ago |
zeripath | afeab941b3 | 5 years ago |
6543 | cf35355db8 | 5 years ago |
Viktor Szakats | 8e9265c402 | 5 years ago |
6543 | 435ce92935 | 5 years ago |
Lunny Xiao | 22cea96c18 | 5 years ago |
6543 | 7565ac02c2 | 5 years ago |
zeripath | 4e85c8e0d8 | 5 years ago |
zeripath | 34b8becef0 | 5 years ago |
6543 | 0752a3895a | 5 years ago |
guillep2k | 595033f78e | 5 years ago |
297 changed files with 6925 additions and 4328 deletions
@ -1,44 +1,44 @@
|
||||
repo: go-gitea/gitea |
||||
groups: |
||||
- |
||||
- |
||||
name: BREAKING |
||||
labels: |
||||
- kind/breaking |
||||
- |
||||
- |
||||
name: FEATURE |
||||
labels: |
||||
- kind/feature |
||||
- |
||||
name: SECURITY |
||||
labels: |
||||
- kind/security |
||||
- |
||||
name: BUGFIXES |
||||
labels: |
||||
- kind/bug |
||||
- |
||||
- |
||||
name: ENHANCEMENT |
||||
labels: |
||||
- kind/enhancement |
||||
- kind/refactor |
||||
- kind/ui |
||||
- |
||||
name: SECURITY |
||||
labels: |
||||
- kind/security |
||||
- |
||||
name: TESTING |
||||
labels: |
||||
- kind/testing |
||||
- |
||||
- |
||||
name: TRANSLATION |
||||
labels: |
||||
- kind/translation |
||||
- |
||||
- |
||||
name: BUILD |
||||
labels: |
||||
- kind/build |
||||
- kind/lint |
||||
- |
||||
- |
||||
name: DOCS |
||||
labels: |
||||
- kind/docs |
||||
- |
||||
- |
||||
name: MISC |
||||
default: true |
||||
default: true |
||||
|
@ -0,0 +1,47 @@
|
||||
// Copyright 2020 The Gitea Authors. All rights reserved.
|
||||
// Use of this source code is governed by a MIT-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package integrations |
||||
|
||||
import ( |
||||
"fmt" |
||||
"net/http" |
||||
"testing" |
||||
|
||||
"code.gitea.io/gitea/models" |
||||
"code.gitea.io/gitea/modules/structs" |
||||
|
||||
"github.com/stretchr/testify/assert" |
||||
) |
||||
|
||||
func TestAPIIssuesMilestone(t *testing.T) { |
||||
prepareTestEnv(t) |
||||
|
||||
milestone := models.AssertExistsAndLoadBean(t, &models.Milestone{ID: 1}).(*models.Milestone) |
||||
repo := models.AssertExistsAndLoadBean(t, &models.Repository{ID: milestone.RepoID}).(*models.Repository) |
||||
owner := models.AssertExistsAndLoadBean(t, &models.User{ID: repo.OwnerID}).(*models.User) |
||||
assert.Equal(t, int64(1), int64(milestone.NumIssues)) |
||||
assert.Equal(t, structs.StateOpen, milestone.State()) |
||||
|
||||
session := loginUser(t, owner.Name) |
||||
token := getTokenForLoggedInUser(t, session) |
||||
|
||||
// update values of issue
|
||||
milestoneState := "closed" |
||||
|
||||
urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/milestones/%d?token=%s", owner.Name, repo.Name, milestone.ID, token) |
||||
req := NewRequestWithJSON(t, "PATCH", urlStr, structs.EditMilestoneOption{ |
||||
State: &milestoneState, |
||||
}) |
||||
resp := session.MakeRequest(t, req, http.StatusOK) |
||||
var apiMilestone structs.Milestone |
||||
DecodeJSON(t, resp, &apiMilestone) |
||||
assert.EqualValues(t, "closed", apiMilestone.State) |
||||
|
||||
req = NewRequest(t, "GET", urlStr) |
||||
resp = session.MakeRequest(t, req, http.StatusOK) |
||||
var apiMilestone2 structs.Milestone |
||||
DecodeJSON(t, resp, &apiMilestone2) |
||||
assert.EqualValues(t, "closed", apiMilestone2.State) |
||||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1 @@
|
||||
4a357436d925b5c974181ff12a994538ddc5a269 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
||||
0cf15c3f66ec8384480ed9c3cf87c9e97fbb0ec3 |
||||
423313fbd38093bb10d0c8387db9105409c6f196 |
||||
|
@ -0,0 +1,19 @@
|
||||
// Copyright 2019 The Gitea Authors. All rights reserved.
|
||||
// Use of this source code is governed by a MIT-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package migrations |
||||
|
||||
import ( |
||||
"github.com/go-xorm/xorm" |
||||
) |
||||
|
||||
func changeSomeColumnsLengthOfExternalLoginUser(x *xorm.Engine) error { |
||||
type ExternalLoginUser struct { |
||||
AccessToken string `xorm:"TEXT"` |
||||
AccessTokenSecret string `xorm:"TEXT"` |
||||
RefreshToken string `xorm:"TEXT"` |
||||
} |
||||
|
||||
return x.Sync2(new(ExternalLoginUser)) |
||||
} |
@ -0,0 +1,15 @@
|
||||
// Copyright 2019 The Gitea Authors. All rights reserved.
|
||||
// Use of this source code is governed by a MIT-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package migrations |
||||
|
||||
import ( |
||||
"github.com/go-xorm/xorm" |
||||
) |
||||
|
||||
func dropColumnHeadUserNameOnPullRequest(x *xorm.Engine) error { |
||||
sess := x.NewSession() |
||||
defer sess.Close() |
||||
return dropTableColumns(sess, "pull_request", "head_user_name") |
||||
} |
@ -1,24 +0,0 @@
|
||||
// Copyright 2019 The Gitea Authors. All rights reserved.
|
||||
// Use of this source code is governed by a MIT-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package models |
||||
|
||||
import ( |
||||
"code.gitea.io/gitea/modules/git" |
||||
) |
||||
|
||||
// GetTagsByPath returns repo tags by its path
|
||||
func GetTagsByPath(path string) ([]*git.Tag, error) { |
||||
gitRepo, err := git.OpenRepository(path) |
||||
if err != nil { |
||||
return nil, err |
||||
} |
||||
|
||||
return gitRepo.GetTagInfos() |
||||
} |
||||
|
||||
// GetTags return repo's tags
|
||||
func (repo *Repository) GetTags() ([]*git.Tag, error) { |
||||
return GetTagsByPath(repo.RepoPath()) |
||||
} |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue