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

Supports wildcard protected branch #20825

Merged
merged 72 commits into from
Jan 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
9f9f488
Make database supports glob branch name protected branch
lunny Aug 17, 2022
1dfa785
Fix bug
lunny Aug 17, 2022
bf27be6
Fix fmt
lunny Aug 17, 2022
963e438
Merge branch 'main' into lunny/glob_protected_branch_rule
lunny Aug 17, 2022
6f39f75
Merge branch 'main' into lunny/glob_protected_branch_rule
lunny Aug 18, 2022
588c5b7
Most UI changes
lunny Aug 18, 2022
997a01d
Merge branch 'main' into lunny/glob_protected_branch_rule
lunny Aug 18, 2022
9740a6d
merge main branch
lunny Sep 6, 2022
b12ac62
Fix test
lunny Sep 6, 2022
5e55875
Merge branch 'main' into lunny/glob_protected_branch_rule
lunny Sep 12, 2022
553869a
support protected branch rules
lunny Sep 12, 2022
aba5aad
support * not cross slash
lunny Sep 13, 2022
80d2396
Merge branch 'main' into lunny/glob_protected_branch_rule
lunny Oct 18, 2022
e894bdf
Fix lint
lunny Oct 18, 2022
957a20b
Fix matching algorithm
lunny Oct 19, 2022
d87e6bd
Merge branch 'main' into lunny/glob_protected_branch_rule
lunny Oct 19, 2022
30bbfd0
Fix import lint
lunny Oct 19, 2022
a82b8d1
Fix tests
lunny Oct 20, 2022
1837aae
Merge branch 'main' into lunny/glob_protected_branch_rule
lunny Oct 20, 2022
a5cc6d3
Rule Sort
lunny Oct 20, 2022
ad304ec
Fix tests
lunny Oct 22, 2022
3425685
Merge branch 'main' into lunny/glob_protected_branch_rule
lunny Oct 22, 2022
17a7982
Fix lint
lunny Oct 22, 2022
86b0029
Merge branch 'main' into lunny/glob_protected_branch_rule
lunny Oct 23, 2022
c0989ed
Fix doc
lunny Oct 23, 2022
562077e
Fix test
lunny Oct 23, 2022
fbb17f3
Merge branch 'main' into lunny/glob_protected_branch_rule
lunny Oct 23, 2022
220d385
Fix lint
lunny Oct 23, 2022
0c234ab
Merge branch 'main' into lunny/glob_protected_branch_rule
lunny Oct 23, 2022
31d6595
Fix lint
lunny Oct 23, 2022
0c1ef7f
Fix test
lunny Oct 24, 2022
b23a742
Merge branch 'main' into lunny/glob_protected_branch_rule
lunny Oct 24, 2022
b428771
merge main branch
lunny Oct 31, 2022
300e623
Merge branch 'main' into lunny/glob_protected_branch_rule
lunny Nov 4, 2022
3e0eefc
Merge branch 'main' into lunny/glob_protected_branch_rule
lunny Nov 5, 2022
398123b
Fix test
lunny Nov 5, 2022
94b5ae6
fix test
lunny Nov 10, 2022
e392b85
Merge branch 'main' into lunny/glob_protected_branch_rule
lunny Nov 10, 2022
4ec2dcb
Merge branch 'main' into lunny/glob_protected_branch_rule
lunny Dec 1, 2022
accc65c
Merge branch 'main' into lunny/glob_protected_branch_rule
lunny Dec 2, 2022
5b23369
Fix test
lunny Dec 3, 2022
fee37c3
Merge branch 'main' into lunny/glob_protected_branch_rule
lunny Dec 3, 2022
e50aad2
Merge main branch
lunny Dec 3, 2022
b0fa0ef
Fix lint
lunny Dec 3, 2022
71310ec
Merge branch 'main' into lunny/glob_protected_branch_rule
lunny Dec 3, 2022
d95f214
Fix test
lunny Dec 3, 2022
bdf75cc
Fix test
lunny Dec 3, 2022
7e43b21
Fix bug
lunny Dec 3, 2022
5e8aa8c
Merge branch 'main' into lunny/glob_protected_branch_rule
lunny Dec 3, 2022
11fcf57
Fix bug
lunny Dec 4, 2022
841cf18
Merge branch 'main' into lunny/glob_protected_branch_rule
lunny Dec 4, 2022
361baca
merge main branch
lunny Dec 4, 2022
6a55815
Some improvements
lunny Dec 5, 2022
40577d7
Add branch name back in API but mark it as deprecated
lunny Dec 5, 2022
39e28c5
Merge branch 'main' into lunny/glob_protected_branch_rule
lunny Dec 5, 2022
8fbe8ad
Fix lint
lunny Dec 6, 2022
16ca6c2
merge main branch
lunny Dec 10, 2022
9f18da1
fix lint
lunny Dec 11, 2022
ded5545
Merge branch 'main' into lunny/glob_protected_branch_rule
lunny Dec 11, 2022
e40338c
Merge branch 'main' into lunny/glob_protected_branch_rule
lunny Dec 11, 2022
8ab38d9
merge main branch
lunny Dec 13, 2022
389dce2
Merge branch 'lunny/glob_protected_branch_rule' of github.com:lunny/g…
lunny Dec 13, 2022
2eeb920
Merge branch 'main' into lunny/glob_protected_branch_rule
lunny Dec 14, 2022
9e3a06d
Update models/git/protected_branch.go
lunny Dec 21, 2022
73a589c
Merge branch 'main' into lunny/glob_protected_branch_rule
lunny Dec 30, 2022
e378263
Merge branch 'lunny/glob_protected_branch_rule' of github.com:lunny/g…
lunny Dec 30, 2022
59c0714
some improvement
lunny Dec 30, 2022
01c2057
Fix lint
lunny Dec 30, 2022
5d078d4
Merge branch 'main' into lunny/glob_protected_branch_rule
lunny Jan 1, 2023
f5c010b
merge main branch
lunny Jan 10, 2023
c1c1a8b
Merge branch 'lunny/glob_protected_branch_rule' of github.com:lunny/g…
lunny Jan 10, 2023
1bbc980
merge main branch
lunny Jan 16, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
430 changes: 15 additions & 415 deletions models/git/branches.go

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions models/git/branches_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ func TestRenameBranch(t *testing.T) {
defer committer.Close()
assert.NoError(t, err)
assert.NoError(t, git_model.UpdateProtectBranch(ctx, repo1, &git_model.ProtectedBranch{
RepoID: repo1.ID,
BranchName: "master",
RepoID: repo1.ID,
RuleName: "master",
}, git_model.WhitelistOptions{}))
assert.NoError(t, committer.Commit())

Expand All @@ -131,8 +131,8 @@ func TestRenameBranch(t *testing.T) {
assert.Equal(t, int64(1), renamedBranch.RepoID)

unittest.AssertExistsAndLoadBean(t, &git_model.ProtectedBranch{
RepoID: repo1.ID,
BranchName: "main",
RepoID: repo1.ID,
RuleName: "main",
})
}

Expand Down
Loading