Skip to content

Commit b893184

Browse files
committed
Beta version
1 parent 6e34880 commit b893184

File tree

7 files changed

+434
-3
lines changed

7 files changed

+434
-3
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
server
2+
digitalocean-bots

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
GitlabHookServer
2-
================
1+
Knowed bugs :
32

4-
Gitlab hookserver with slack notifications.
3+
- If the commit message includes a & character, the slack API send a 500 error (so the & is replaced with the word " and ")
4+
- If the commit message includes a "" character, the slack API send a 500 error (so the " is replaced with two uniquotes : '')

data/build.go

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package data
2+
3+
/*
4+
Stuctures of a build
5+
*/
6+
type Build struct {
7+
Build_id float64
8+
Build_status string
9+
Build_started_at string
10+
Build_finished_at string
11+
Project_id float64
12+
Project_name string
13+
Gitlab_url string
14+
Ref string
15+
Sha string
16+
Before_sha string
17+
Push_data Push_Data
18+
}
19+
20+
type Push_Data struct {
21+
Before string
22+
After string
23+
Ref string
24+
User_id float64
25+
User_name string
26+
Project_id float64
27+
Repository Repository
28+
Commits []Commit
29+
Total_commits_count float64
30+
}

data/item.go

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package data
2+
3+
type Repository struct {
4+
Name string
5+
Url string
6+
Description string
7+
Homepage string
8+
}
9+
10+
type Commit struct {
11+
Id string
12+
Message string
13+
Timestamp string
14+
Url string
15+
Author Author
16+
}
17+
18+
type Author struct {
19+
Name string
20+
Email string
21+
}

data/merge.go

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
package data
2+
3+
/*
4+
Stuctures of a merge
5+
*/
6+
type Merge struct {
7+
Object_kind string
8+
Object_attributes Object_attributes
9+
}
10+
11+
type Object_attributes struct {
12+
Id float64
13+
Target_branch string
14+
Source_branch string
15+
Source_project_id float64
16+
Author_id float64
17+
Assignee_id float64
18+
Title string
19+
Created_at string
20+
Updated_at string
21+
St_commits float64
22+
St_diffs float64
23+
Milestone_id float64
24+
State string
25+
Merge_status string
26+
Target_project_id float64
27+
Iid float64
28+
Description string
29+
Source Branche
30+
Target Branche
31+
Last_commit Commit
32+
}
33+
34+
type Branche struct {
35+
Name string
36+
Ssh_url string
37+
Http_url string
38+
Visibility_level float64
39+
Namespace string
40+
}

data/push.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package data
2+
3+
/*
4+
Stuctures of a push
5+
*/
6+
type Push struct {
7+
Before string
8+
After string
9+
Ref string
10+
User_id float64
11+
User_name string
12+
Project_id float64
13+
Repository Repository
14+
Commits []Commit
15+
Total_commits_count float64
16+
}

0 commit comments

Comments
 (0)