Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
佳 邓
Gitlab4j Api
Commits
a28fc55f
Commit
a28fc55f
authored
Feb 05, 2017
by
Greg Messner
Browse files
Mods for GitLab 8 support.
parent
1d5d936c
Changes
50
Hide whitespace changes
Inline
Side-by-side
src/main/java/com/messners/gitlab/api/models/ProjectHook.java
View file @
a28fc55f
package
com.messners.gitlab.api.models
;
package
com.messners.gitlab.api.models
;
import
java.util.Date
;
import
javax.xml.bind.annotation.XmlAccessType
;
import
javax.xml.bind.annotation.XmlAccessType
;
import
javax.xml.bind.annotation.XmlAccessorType
;
import
javax.xml.bind.annotation.XmlAccessorType
;
import
javax.xml.bind.annotation.XmlRootElement
;
import
javax.xml.bind.annotation.XmlRootElement
;
...
@@ -8,68 +10,122 @@ import javax.xml.bind.annotation.XmlRootElement;
...
@@ -8,68 +10,122 @@ import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement
@XmlRootElement
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
public
class
ProjectHook
{
public
class
ProjectHook
{
private
String
createdAt
;
private
Boolean
build_events
;
private
Integer
id
;
private
Date
createdAt
;
private
Boolean
issuesEvents
;
private
Boolean
enable_ssl_verification
;
private
Boolean
mergeRequestsEvents
;
private
Integer
id
;
private
Integer
projectId
;
private
Boolean
issuesEvents
;
private
Boolean
pushEvents
;
private
Boolean
mergeRequestsEvents
;
private
String
url
;
private
Boolean
note_events
;
private
Boolean
pipeline_events
;
public
String
getCreatedAt
()
{
private
Integer
projectId
;
return
this
.
createdAt
;
private
Boolean
pushEvents
;
}
private
Boolean
tag_push_events
;
private
String
url
;
public
void
setCreatedAt
(
String
createdAt
)
{
private
Boolean
wiki_page_events
;
this
.
createdAt
=
createdAt
;
}
public
Boolean
getBuild_events
()
{
return
build_events
;
public
Integer
getId
()
{
}
return
this
.
id
;
}
public
void
setBuild_events
(
Boolean
build_events
)
{
this
.
build_events
=
build_events
;
public
void
setId
(
Integer
id
)
{
}
this
.
id
=
id
;
}
public
Date
getCreatedAt
()
{
return
createdAt
;
public
Boolean
getIssuesEvents
()
{
}
return
this
.
issuesEvents
;
}
public
void
setCreatedAt
(
Date
createdAt
)
{
this
.
createdAt
=
createdAt
;
public
void
setIssuesEvents
(
Boolean
issuesEvents
)
{
}
this
.
issuesEvents
=
issuesEvents
;
}
public
Boolean
getEnable_ssl_verification
()
{
return
enable_ssl_verification
;
public
Boolean
getMergeRequestsEvents
()
{
}
return
this
.
mergeRequestsEvents
;
}
public
void
setEnable_ssl_verification
(
Boolean
enable_ssl_verification
)
{
this
.
enable_ssl_verification
=
enable_ssl_verification
;
public
void
setMergeRequestsEvents
(
Boolean
mergeRequestsEvents
)
{
}
this
.
mergeRequestsEvents
=
mergeRequestsEvents
;
}
public
Integer
getId
()
{
return
id
;
public
Integer
getProjectId
()
{
}
return
this
.
projectId
;
}
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
public
void
setProjectId
(
Integer
projectId
)
{
}
this
.
projectId
=
projectId
;
}
public
Boolean
getIssuesEvents
()
{
return
issuesEvents
;
public
Boolean
getPushEvents
()
{
}
return
this
.
pushEvents
;
}
public
void
setIssuesEvents
(
Boolean
issuesEvents
)
{
this
.
issuesEvents
=
issuesEvents
;
public
void
setPushEvents
(
Boolean
pushEvents
)
{
}
this
.
pushEvents
=
pushEvents
;
}
public
Boolean
getMergeRequestsEvents
()
{
return
mergeRequestsEvents
;
public
String
getUrl
()
{
}
return
this
.
url
;
}
public
void
setMergeRequestsEvents
(
Boolean
mergeRequestsEvents
)
{
this
.
mergeRequestsEvents
=
mergeRequestsEvents
;
public
void
setUrl
(
String
url
)
{
}
this
.
url
=
url
;
}
public
Boolean
getNote_events
()
{
}
return
note_events
;
}
public
void
setNote_events
(
Boolean
note_events
)
{
this
.
note_events
=
note_events
;
}
public
Boolean
getPipeline_events
()
{
return
pipeline_events
;
}
public
void
setPipeline_events
(
Boolean
pipeline_events
)
{
this
.
pipeline_events
=
pipeline_events
;
}
public
Integer
getProjectId
()
{
return
projectId
;
}
public
void
setProjectId
(
Integer
projectId
)
{
this
.
projectId
=
projectId
;
}
public
Boolean
getPushEvents
()
{
return
pushEvents
;
}
public
void
setPushEvents
(
Boolean
pushEvents
)
{
this
.
pushEvents
=
pushEvents
;
}
public
Boolean
getTag_push_events
()
{
return
tag_push_events
;
}
public
void
setTag_push_events
(
Boolean
tag_push_events
)
{
this
.
tag_push_events
=
tag_push_events
;
}
public
String
getUrl
()
{
return
url
;
}
public
void
setUrl
(
String
url
)
{
this
.
url
=
url
;
}
public
Boolean
getWiki_page_events
()
{
return
wiki_page_events
;
}
public
void
setWiki_page_events
(
Boolean
wiki_page_events
)
{
this
.
wiki_page_events
=
wiki_page_events
;
}
}
\ No newline at end of file
src/main/java/com/messners/gitlab/api/models/ProjectSnippet.java
View file @
a28fc55f
...
@@ -10,67 +10,76 @@ import javax.xml.bind.annotation.XmlRootElement;
...
@@ -10,67 +10,76 @@ import javax.xml.bind.annotation.XmlRootElement;
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
public
class
ProjectSnippet
{
public
class
ProjectSnippet
{
private
Author
author
;
private
Author
author
;
private
Date
createdAt
;
private
Date
createdAt
;
private
Date
expiresAt
;
private
Date
expiresAt
;
private
String
fileName
;
private
String
fileName
;
private
Integer
id
;
private
Integer
id
;
private
String
title
;
private
String
title
;
private
String
updatedAt
;
private
String
updatedAt
;
private
String
webUrl
;
public
Author
getAuthor
()
{
return
this
.
author
;
public
Author
getAuthor
()
{
}
return
this
.
author
;
}
public
void
setAuthor
(
Author
author
)
{
this
.
author
=
author
;
public
void
setAuthor
(
Author
author
)
{
}
this
.
author
=
author
;
}
public
Date
getCreatedAt
()
{
return
this
.
createdAt
;
public
Date
getCreatedAt
()
{
}
return
this
.
createdAt
;
}
public
void
setCreatedAt
(
Date
createdAt
)
{
this
.
createdAt
=
createdAt
;
public
void
setCreatedAt
(
Date
createdAt
)
{
}
this
.
createdAt
=
createdAt
;
}
public
Date
getExpiresAt
()
{
return
this
.
expiresAt
;
public
Date
getExpiresAt
()
{
}
return
this
.
expiresAt
;
}
public
void
setExpiresAt
(
Date
expiresAt
)
{
this
.
expiresAt
=
expiresAt
;
public
void
setExpiresAt
(
Date
expiresAt
)
{
}
this
.
expiresAt
=
expiresAt
;
}
public
String
getFileName
()
{
return
this
.
fileName
;
public
String
getFileName
()
{
}
return
this
.
fileName
;
}
public
void
setFileName
(
String
fileName
)
{
this
.
fileName
=
fileName
;
public
void
setFileName
(
String
fileName
)
{
}
this
.
fileName
=
fileName
;
}
public
Integer
getId
()
{
return
this
.
id
;
public
Integer
getId
()
{
}
return
this
.
id
;
}
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
public
void
setId
(
Integer
id
)
{
}
this
.
id
=
id
;
}
public
String
getTitle
()
{
return
this
.
title
;
public
String
getTitle
()
{
}
return
this
.
title
;
}
public
void
setTitle
(
String
title
)
{
this
.
title
=
title
;
public
void
setTitle
(
String
title
)
{
}
this
.
title
=
title
;
}
public
String
getUpdatedAt
()
{
return
this
.
updatedAt
;
public
String
getUpdatedAt
()
{
}
return
this
.
updatedAt
;
}
public
void
setUpdatedAt
(
String
updatedAt
)
{
this
.
updatedAt
=
updatedAt
;
public
void
setUpdatedAt
(
String
updatedAt
)
{
}
this
.
updatedAt
=
updatedAt
;
}
public
String
getWebUrl
()
{
return
webUrl
;
}
public
void
setWebUrl
(
String
webUrl
)
{
this
.
webUrl
=
webUrl
;
}
}
}
src/main/java/com/messners/gitlab/api/models/Repository.java
View file @
a28fc55f
...
@@ -8,40 +8,40 @@ import javax.xml.bind.annotation.XmlRootElement;
...
@@ -8,40 +8,40 @@ import javax.xml.bind.annotation.XmlRootElement;
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
public
class
Repository
{
public
class
Repository
{
private
String
description
;
private
String
description
;
private
String
homepage
;
private
String
homepage
;
private
String
name
;
private
String
name
;
private
String
url
;
private
String
url
;
public
String
getDescription
()
{
public
String
getDescription
()
{
return
this
.
description
;
return
this
.
description
;
}
}
public
void
setDescription
(
String
description
)
{
public
void
setDescription
(
String
description
)
{
this
.
description
=
description
;
this
.
description
=
description
;
}
}
public
String
getHomepage
()
{
public
String
getHomepage
()
{
return
this
.
homepage
;
return
this
.
homepage
;
}
}
public
void
setHomepage
(
String
homepage
)
{
public
void
setHomepage
(
String
homepage
)
{
this
.
homepage
=
homepage
;
this
.
homepage
=
homepage
;
}
}
public
String
getName
()
{
public
String
getName
()
{
return
this
.
name
;
return
this
.
name
;
}
}
public
void
setName
(
String
name
)
{
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
this
.
name
=
name
;
}
}
public
String
getUrl
()
{
public
String
getUrl
()
{
return
this
.
url
;
return
this
.
url
;
}
}
public
void
setUrl
(
String
url
)
{
public
void
setUrl
(
String
url
)
{
this
.
url
=
url
;
this
.
url
=
url
;
}
}
}
}
src/main/java/com/messners/gitlab/api/models/RepositoryFile.java
View file @
a28fc55f
package
com.messners.gitlab.api.models
;
package
com.messners.gitlab.api.models
;
import
javax.xml.bind.annotation.XmlAccessType
;
import
javax.xml.bind.annotation.XmlAccessType
;
import
javax.xml.bind.annotation.XmlAccessorType
;
import
javax.xml.bind.annotation.XmlAccessorType
;
import
javax.xml.bind.annotation.XmlRootElement
;
import
javax.xml.bind.annotation.XmlRootElement
;
...
@@ -10,76 +9,85 @@ import javax.xml.bind.annotation.XmlRootElement;
...
@@ -10,76 +9,85 @@ import javax.xml.bind.annotation.XmlRootElement;
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
public
class
RepositoryFile
{
public
class
RepositoryFile
{
private
String
fileName
;
//file name only, Ex.
lib/
class.rb
private
String
fileName
;
//
file name only, Ex. class.rb
private
String
filePath
;
//full path to
file. Ex. lib/class.rb
private
String
filePath
;
//
full path to file. Ex. lib/class.rb
private
Integer
size
;
private
Integer
size
;
private
String
encoding
;
private
String
encoding
;
private
String
content
;
private
String
content
;
private
String
ref
;
private
String
ref
;
private
String
blobId
;
private
String
blobId
;
private
String
commitId
;
private
String
commitId
;
private
String
lastCommitId
;
public
String
getFileName
()
{
return
fileName
;
}
public
void
setFileName
(
String
fileName
)
{
this
.
fileName
=
fileName
;
}
public
String
getFile
Name
()
{
public
String
getFile
Path
()
{
return
file
Name
;
return
file
Path
;
}
}
public
void
setFile
Name
(
String
file
Name
)
{
public
void
setFile
Path
(
String
file
Path
)
{
this
.
file
Name
=
file
Name
;
this
.
file
Path
=
file
Path
;
}
}
public
String
getFilePath
()
{
public
Integer
getSize
()
{
return
filePath
;
return
size
;
}
}
public
void
set
FilePath
(
String
filePath
)
{
public
void
set
Size
(
Integer
size
)
{
this
.
filePath
=
filePath
;
this
.
size
=
size
;
}
}
public
Integer
getSize
()
{
public
String
getEncoding
()
{
return
size
;
return
encoding
;
}
}
public
void
set
Size
(
Integer
size
)
{
public
void
set
Encoding
(
String
encoding
)
{
this
.
size
=
size
;
this
.
encoding
=
encoding
;
}
}
public
String
get
Encoding
()
{
public
String
get
Content
()
{
return
encoding
;
return
content
;
}
}
public
void
set
Encoding
(
String
encoding
)
{
public
void
set
Content
(
String
content
)
{
this
.
encoding
=
encoding
;
this
.
content
=
content
;
}
}
public
String
get
Content
()
{
public
String
get
Ref
()
{
return
content
;
return
ref
;
}
}
public
void
set
Content
(
String
content
)
{
public
void
set
Ref
(
String
ref
)
{
this
.
content
=
content
;
this
.
ref
=
ref
;
}
}
public
String
get
Ref
()
{
public
String
get
BlobId
()
{
return
ref
;
return
blobId
;
}
}
public
void
set
Ref
(
String
ref
)
{
public
void
set
BlobId
(
String
blobId
)
{
this
.
ref
=
ref
;
this
.
blobId
=
blobId
;
}
}
public
String
get
Blob
Id
()
{
public
String
get
Commit
Id
()
{
return
blob
Id
;
return
commit
Id
;
}
}
public
void
set
Blob
Id
(
String
blob
Id
)
{
public
void
set
Commit
Id
(
String
commit
Id
)
{
this
.
blobId
=
blob
Id
;
this
.
commitId
=
commit
Id
;
}
}
public
String
getCommitId
()
{
public
String
get
Last
CommitId
()
{
return
c
ommitId
;
return
lastC
ommitId
;
}
}
public
void
setCommitId
(
String
c
ommitId
)
{
public
void
set
Last
CommitId
(
String
lastC
ommitId
)
{
this
.
c
ommitId
=
c
ommitId
;
this
.
lastC
ommitId
=
lastC
ommitId
;
}
}
}
}
src/main/java/com/messners/gitlab/api/models/Session.java
View file @
a28fc55f
package
com.messners.gitlab.api.models
;
package
com.messners.gitlab.api.models
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
javax.xml.bind.annotation.XmlAccessType
;
import
javax.xml.bind.annotation.XmlAccessType
;
import
javax.xml.bind.annotation.XmlAccessorType
;
import
javax.xml.bind.annotation.XmlAccessorType
;
...
@@ -10,166 +11,211 @@ import javax.xml.bind.annotation.XmlRootElement;
...
@@ -10,166 +11,211 @@ import javax.xml.bind.annotation.XmlRootElement;
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
public
class
Session
{
public
class
Session
{
private
String
bio
;
private
String
avatarUrl
;
private
Boolean
blocked
;
private
String
bio
;
private
Boolean
canCreateGroup
;
private
Boolean
blocked
;
private
Boolean
canCreateProject
;
private
Boolean
canCreateGroup
;
private
Boolean
canCreateTeam
;
private
Boolean
canCreateProject
;
private
Date
createdAt
;
private
Integer
colorSchemeId
;
private
Boolean
darkScheme
;
private
Date
createdAt
;
private
String
email
;
private
Date
currentSignInAt
;
private
Integer
id
;
private
Boolean
darkScheme
;
private
Boolean
isAdmin
;
private
String
email
;
private
String
linkedin
;
private
Integer
id
;
private
String
name
;
private
List
<
Identity
>
identities
;
private
String
privateToken
;
private
Boolean
isAdmin
;
private
String
skype
;
private
String
linkedin
;
private
Integer
themeId
;
private
String
name
;
private
String
twitter
;
private
String
privateToken
;
private
String
username
;
private
Integer
projectLimit
;
private
String
websiteUrl
;
private
String
skype
;
private
Integer
themeId
;
public
String
getBio
()
{
private
String
twitter
;
return
this
.
bio
;
private
Boolean
twoFactorEnabled
;
}
private
String
username
;
private
String
websiteUrl
;
public
void
setBio
(
String
bio
)
{
this
.
bio
=
bio
;
public
String
getAvatarUrl
()
{
}
return
avatarUrl
;
}
public
Boolean
getBlocked
()
{
return
this
.
blocked
;
public
void
setAvatarUrl
(
String
avatarUrl
)
{
}
this
.
avatarUrl
=
avatarUrl
;
}
public
void
setBlocked
(
Boolean
blocked
)
{
this
.
blocked
=
blocked
;
public
String
getBio
()
{
}
return
bio
;
}
public
Boolean
getCanCreateGroup
()
{
return
this
.
canCreateGroup
;
public
void
setBio
(
String
bio
)
{
}
this
.
bio
=
bio
;
}
public
void
setCanCreateGroup
(
Boolean
canCreateGroup
)
{
this
.
canCreateGroup
=
canCreateGroup
;
public
Boolean
getBlocked
()
{
}
return
blocked
;
}
public
Boolean
getCanCreateProject
()
{
return
this
.
canCreateProject
;
public
void
setBlocked
(
Boolean
blocked
)
{
}
this
.
blocked
=
blocked
;
}
public
void
setCanCreateProject
(
Boolean
canCreateProject
)
{
this
.
canCreateProject
=
canCreateProject
;
public
Boolean
getCanCreateGroup
()
{
}
return
canCreateGroup
;
}
public
Boolean
getCanCreateTeam
()
{
return
this
.
canCreateTeam
;
public
void
setCanCreateGroup
(
Boolean
canCreateGroup
)
{
}
this
.
canCreateGroup
=
canCreateGroup
;
}
public
void
setCanCreateTeam
(
Boolean
canCreateTeam
)
{
this
.
canCreateTeam
=
canCreateTeam
;
public
Boolean
getCanCreateProject
()
{
}
return
canCreateProject
;
}
public
Date
getCreatedAt
()
{
return
this
.
createdAt
;
public
void
setCanCreateProject
(
Boolean
canCreateProject
)
{
}
this
.
canCreateProject
=
canCreateProject
;
}
public
void
setCreatedAt
(
Date
createdAt
)
{
this
.
createdAt
=
createdAt
;
public
Integer
getColorSchemeId
()
{
}
return
colorSchemeId
;
}
public
Boolean
getDarkScheme
()
{
return
this
.
darkScheme
;
public
void
setColorSchemeId
(
Integer
colorSchemeId
)
{
}
this
.
colorSchemeId
=
colorSchemeId
;
}
public
void
setDarkScheme
(
Boolean
darkScheme
)
{
this
.
darkScheme
=
darkScheme
;
public
Date
getCreatedAt
()
{
}
return
createdAt
;
}
public
String
getEmail
()
{
return
this
.
email
;
public
void
setCreatedAt
(
Date
createdAt
)
{
}
this
.
createdAt
=
createdAt
;
}
public
void
setEmail
(
String
email
)
{
this
.
email
=
email
;
public
Date
getCurrentSignInAt
()
{
}
return
currentSignInAt
;
}
public
Integer
getId
()
{
return
this
.
id
;
public
void
setCurrentSignInAt
(
Date
currentSignInAt
)
{
}
this
.
currentSignInAt
=
currentSignInAt
;
}
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
public
Boolean
getDarkScheme
()
{
}
return
darkScheme
;
}
public
Boolean
getIsAdmin
()
{
return
this
.
isAdmin
;
public
void
setDarkScheme
(
Boolean
darkScheme
)
{
}
this
.
darkScheme
=
darkScheme
;
}
public
void
setIsAdmin
(
Boolean
isAdmin
)
{
this
.
isAdmin
=
isAdmin
;
public
String
getEmail
()
{
}
return
email
;
}
public
String
getLinkedin
()
{
return
this
.
linkedin
;
public
void
setEmail
(
String
email
)
{
}
this
.
email
=
email
;
}
public
void
setLinkedin
(
String
linkedin
)
{
this
.
linkedin
=
linkedin
;
public
Integer
getId
()
{
}
return
id
;
}
public
String
getName
()
{
return
this
.
name
;
public
void
setId
(
Integer
id
)
{
}
this
.
id
=
id
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
public
List
<
Identity
>
getIdentities
()
{
}
return
identities
;
}
public
String
getPrivateToken
()
{
return
this
.
privateToken
;
public
void
setIdentities
(
List
<
Identity
>
identities
)
{
}
this
.
identities
=
identities
;
}
public
Boolean
getIsAdmin
()
{
return
isAdmin
;
}
public
void
set
PrivateToken
(
String
privateToke
n
)
{
public
void
set
IsAdmin
(
Boolean
isAdmi
n
)
{
this
.
privateToken
=
privateToke
n
;
this
.
isAdmin
=
isAdmi
n
;
}
}
public
String
get
Skype
()
{
public
String
get
Linkedin
()
{
return
this
.
skype
;
return
linkedin
;
}
}
public
void
set
Skype
(
String
skype
)
{
public
void
set
Linkedin
(
String
linkedin
)
{
this
.
skype
=
skype
;
this
.
linkedin
=
linkedin
;
}
}
public
Integer
getThemeId
()
{
public
String
getName
()
{
return
this
.
themeId
;
return
name
;
}
}
public
void
set
ThemeId
(
Integer
themeId
)
{
public
void
set
Name
(
String
name
)
{
this
.
themeId
=
themeId
;
this
.
name
=
name
;
}
}
public
String
get
Twitter
()
{
public
String
get
PrivateToken
()
{
return
this
.
twitter
;
return
privateToken
;
}
}
public
void
set
Twitter
(
String
twitter
)
{
public
void
set
PrivateToken
(
String
privateToken
)
{
this
.
twitter
=
twitter
;
this
.
privateToken
=
privateToken
;
}
}
public
String
getUsername
()
{
public
Integer
getProjectLimit
()
{
return
this
.
username
;
return
projectLimit
;
}
}
public
void
set
Username
(
String
username
)
{
public
void
set
ProjectLimit
(
Integer
projectLimit
)
{
this
.
username
=
username
;
this
.
projectLimit
=
projectLimit
;
}
}
public
String
get
WebsiteUrl
()
{
public
String
get
Skype
()
{
return
this
.
websiteUrl
;
return
skype
;
}
}
public
void
setWebsiteUrl
(
String
websiteUrl
)
{
public
void
setSkype
(
String
skype
)
{
this
.
websiteUrl
=
websiteUrl
;
this
.
skype
=
skype
;
}
}
public
Integer
getThemeId
()
{
return
themeId
;
}
public
void
setThemeId
(
Integer
themeId
)
{
this
.
themeId
=
themeId
;
}
public
String
getTwitter
()
{
return
twitter
;
}
public
void
setTwitter
(
String
twitter
)
{
this
.
twitter
=
twitter
;
}
public
Boolean
getTwoFactorEnabled
()
{
return
twoFactorEnabled
;
}
public
void
setTwoFactorEnabled
(
Boolean
twoFactorEnabled
)
{
this
.
twoFactorEnabled
=
twoFactorEnabled
;
}
public
String
getUsername
()
{
return
username
;
}
public
void
setUsername
(
String
username
)
{
this
.
username
=
username
;
}
public
String
getWebsiteUrl
()
{
return
websiteUrl
;
}
public
void
setWebsiteUrl
(
String
websiteUrl
)
{
this
.
websiteUrl
=
websiteUrl
;
}
}
}
src/main/java/com/messners/gitlab/api/models/SystemHook.java
View file @
a28fc55f
...
@@ -8,58 +8,58 @@ import javax.xml.bind.annotation.XmlRootElement;
...
@@ -8,58 +8,58 @@ import javax.xml.bind.annotation.XmlRootElement;
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
public
class
SystemHook
{
public
class
SystemHook
{
private
String
eventName
;
private
String
eventName
;
private
String
name
;
private
String
name
;
private
String
ownerEmail
;
private
String
ownerEmail
;
private
String
ownerName
;
private
String
ownerName
;
private
String
path
;
private
String
path
;
private
Integer
projectId
;
private
Integer
projectId
;
public
String
getEventName
()
{
public
String
getEventName
()
{
return
this
.
eventName
;
return
this
.
eventName
;
}
}
public
void
setEventName
(
String
eventName
)
{
public
void
setEventName
(
String
eventName
)
{
this
.
eventName
=
eventName
;
this
.
eventName
=
eventName
;
}
}
public
String
getName
()
{
public
String
getName
()
{
return
this
.
name
;
return
this
.
name
;
}
}
public
void
setName
(
String
name
)
{
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
this
.
name
=
name
;
}
}
public
String
getOwnerEmail
()
{
public
String
getOwnerEmail
()
{
return
this
.
ownerEmail
;
return
this
.
ownerEmail
;
}
}
public
void
setOwnerEmail
(
String
ownerEmail
)
{
public
void
setOwnerEmail
(
String
ownerEmail
)
{
this
.
ownerEmail
=
ownerEmail
;
this
.
ownerEmail
=
ownerEmail
;
}
}
public
String
getOwnerName
()
{
public
String
getOwnerName
()
{
return
this
.
ownerName
;
return
this
.
ownerName
;
}
}
public
void
setOwnerName
(
String
ownerName
)
{
public
void
setOwnerName
(
String
ownerName
)
{
this
.
ownerName
=
ownerName
;
this
.
ownerName
=
ownerName
;
}
}
public
String
getPath
()
{
public
String
getPath
()
{
return
this
.
path
;
return
this
.
path
;
}
}
public
void
setPath
(
String
path
)
{
public
void
setPath
(
String
path
)
{
this
.
path
=
path
;
this
.
path
=
path
;
}
}
public
Integer
getProjectId
()
{
public
Integer
getProjectId
()
{
return
this
.
projectId
;
return
this
.
projectId
;
}
}
public
void
setProjectId
(
Integer
projectId
)
{
public
void
setProjectId
(
Integer
projectId
)
{
this
.
projectId
=
projectId
;
this
.
projectId
=
projectId
;
}
}
}
}
src/main/java/com/messners/gitlab/api/models/Tag.java
View file @
a28fc55f
...
@@ -8,31 +8,40 @@ import javax.xml.bind.annotation.XmlRootElement;
...
@@ -8,31 +8,40 @@ import javax.xml.bind.annotation.XmlRootElement;
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
public
class
Tag
{
public
class
Tag
{
private
Commit
commit
;
private
Commit
commit
;
private
String
name
;
private
String
message
;
private
Boolean
isProtected
;
private
String
name
;
private
Release
release
;
public
Commit
getCommit
()
{
return
this
.
commit
;
public
Commit
getCommit
()
{
}
return
this
.
commit
;
}
public
void
setCommit
(
Commit
commit
)
{
this
.
commit
=
commit
;
public
void
setCommit
(
Commit
commit
)
{
}
this
.
commit
=
commit
;
}
public
String
getName
()
{
return
this
.
name
;
public
String
getMessage
()
{
}
return
message
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
public
void
setMessage
(
String
message
)
{
}
this
.
message
=
message
;
}
public
Boolean
getProtected
()
{
return
this
.
isProtected
;
public
String
getName
()
{
}
return
this
.
name
;
}
public
void
setProtected
(
Boolean
isProtected
)
{
this
.
isProtected
=
isProtected
;
public
void
setName
(
String
name
)
{
}
this
.
name
=
name
;
}
public
Release
getRelease
()
{
return
release
;
}
public
void
setRelease
(
Release
release
)
{
this
.
release
=
release
;
}
}
}
src/main/java/com/messners/gitlab/api/models/TreeItem.java
View file @
a28fc55f
...
@@ -7,50 +7,58 @@ import javax.xml.bind.annotation.XmlRootElement;
...
@@ -7,50 +7,58 @@ import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement
@XmlRootElement
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
public
class
TreeItem
{
public
class
TreeItem
{
public
enum
Type
{
public
enum
Type
{
TREE
,
TREE
,
BLOB
;
BLOB
;
public
String
toString
()
{
public
String
toString
()
{
return
(
name
().
toLowerCase
());
return
(
name
().
toLowerCase
());
}
}
}
}
private
String
id
;
private
String
id
;
private
String
mode
;
private
String
mode
;
private
String
name
;
private
String
name
;
private
String
path
;
private
Type
type
;
private
Type
type
;
public
String
getId
()
{
public
String
getId
()
{
return
this
.
id
;
return
this
.
id
;
}
}
public
void
setId
(
String
id
)
{
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
this
.
id
=
id
;
}
}
public
String
getMode
()
{
public
String
getMode
()
{
return
this
.
mode
;
return
this
.
mode
;
}
}
public
void
setMode
(
String
mode
)
{
public
void
setMode
(
String
mode
)
{
this
.
mode
=
mode
;
this
.
mode
=
mode
;
}
}
public
String
getName
()
{
public
String
getName
()
{
return
this
.
name
;
return
this
.
name
;
}
}
public
void
setName
(
String
name
)
{
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
this
.
name
=
name
;
}
}
public
Type
getType
()
{
public
String
getPath
()
{
return
this
.
type
;
return
this
.
path
;
}
}
public
void
setType
(
Type
type
)
{
public
void
setPath
(
String
path
)
{
this
.
type
=
type
;
this
.
path
=
path
;
}
}
public
Type
getType
()
{
return
this
.
type
;
}
public
void
setType
(
Type
type
)
{
this
.
type
=
type
;
}
}
}
src/main/java/com/messners/gitlab/api/models/User.java
View file @
a28fc55f
package
com.messners.gitlab.api.models
;
package
com.messners.gitlab.api.models
;
import
java.util.Date
;
import
javax.xml.bind.annotation.XmlAccessType
;
import
javax.xml.bind.annotation.XmlAccessorType
;
import
javax.xml.bind.annotation.XmlRootElement
;
import
javax.xml.bind.annotation.XmlRootElement
;
@XmlRootElement
@XmlRootElement
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
public
class
User
extends
AbstractUser
{
public
class
User
{
private
String
bio
;
private
Boolean
canCreateGroup
;
private
Integer
colorSchemeId
;
private
Date
createdAt
;
private
String
email
;
private
String
externUid
;
private
Integer
id
;
private
Boolean
isAdmin
;
private
String
linkedin
;
private
String
name
;
private
String
provider
;
private
String
skype
;
private
String
state
;
private
Integer
themeId
;
private
String
twitter
;
private
String
username
;
private
String
websiteUrl
;
public
String
getBio
()
{
return
this
.
bio
;
}
public
void
setBio
(
String
bio
)
{
this
.
bio
=
bio
;
}
public
boolean
getCanCreateGroup
()
{
return
this
.
canCreateGroup
;
}
public
void
setCanCreateGroup
(
boolean
canCreateGroup
)
{
this
.
canCreateGroup
=
canCreateGroup
;
}
public
Integer
getColorSchemeId
()
{
return
this
.
colorSchemeId
;
}
public
void
setColorSchemeId
(
Integer
colorSchemeId
)
{
this
.
colorSchemeId
=
colorSchemeId
;
}
public
Date
getCreatedAt
()
{
return
this
.
createdAt
;
}
public
void
setCreatedAt
(
Date
createdAt
)
{
this
.
createdAt
=
createdAt
;
}
public
String
getEmail
()
{
return
this
.
email
;
}
public
void
setEmail
(
String
email
)
{
this
.
email
=
email
;
}
public
String
getExternUid
()
{
return
this
.
externUid
;
}
public
void
setExternUid
(
String
externUid
)
{
this
.
externUid
=
externUid
;
}
public
Integer
getId
()
{
return
this
.
id
;
}
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
public
boolean
getIsAdmin
()
{
return
this
.
isAdmin
;
}
public
void
setIsAdmin
(
boolean
isAdmin
)
{
this
.
isAdmin
=
isAdmin
;
}
public
String
getLinkedin
()
{
return
this
.
linkedin
;
}
public
void
setLinkedin
(
String
linkedin
)
{
this
.
linkedin
=
linkedin
;
}
public
String
getName
()
{
return
this
.
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getProvider
()
{
return
this
.
provider
;
}
public
void
setProvider
(
String
provider
)
{
this
.
provider
=
provider
;
}
public
String
getSkype
()
{
return
this
.
skype
;
}
public
void
setSkype
(
String
skype
)
{
this
.
skype
=
skype
;
}
public
String
getState
()
{
return
this
.
state
;
}
public
void
setState
(
String
state
)
{
this
.
state
=
state
;
}
public
Integer
getThemeId
()
{
return
this
.
themeId
;
}
public
void
setThemeId
(
Integer
themeId
)
{
this
.
themeId
=
themeId
;
}
public
String
getTwitter
()
{
return
this
.
twitter
;
}
public
void
setTwitter
(
String
twitter
)
{
this
.
twitter
=
twitter
;
}
public
String
getUsername
()
{
return
this
.
username
;
}
public
void
setUsername
(
String
username
)
{
this
.
username
=
username
;
}
public
String
getWebsiteUrl
()
{
return
this
.
websiteUrl
;
}
public
void
setWebsiteUrl
(
String
websiteUrl
)
{
this
.
websiteUrl
=
websiteUrl
;
}
public
static
final
boolean
isValid
(
User
user
)
{
return
(
user
!=
null
&&
user
.
getId
()
!=
null
);
}
}
}
src/main/java/com/messners/gitlab/api/webhook/EventObject.java
View file @
a28fc55f
package
com.messners.gitlab.api.webhook
;
package
com.messners.gitlab.api.webhook
;
import
javax.xml.bind.annotation.XmlAccessType
;
import
javax.xml.bind.annotation.XmlAccessType
;
import
com.fasterxml.jackson.annotation.JsonSubTypes
;
import
com.fasterxml.jackson.annotation.JsonTypeInfo
;
import
javax.xml.bind.annotation.XmlAccessorType
;
import
javax.xml.bind.annotation.XmlAccessorType
;
import
javax.xml.bind.annotation.XmlRootElement
;
import
javax.xml.bind.annotation.XmlRootElement
;
@JsonTypeInfo
(
use
=
JsonTypeInfo
.
Id
.
NAME
,
include
=
JsonTypeInfo
.
As
.
PROPERTY
,
property
=
"objectKind"
,
visible
=
true
)
@JsonSubTypes
({
@JsonSubTypes
.
Type
(
value
=
IssueEvent
.
class
,
name
=
IssueEvent
.
OBJECT_KIND
),
@JsonSubTypes
.
Type
(
value
=
PushEvent
.
class
,
name
=
PushEvent
.
OBJECT_KIND
),
@JsonSubTypes
.
Type
(
value
=
MergeRequestEvent
.
class
,
name
=
MergeRequestEvent
.
OBJECT_KIND
)
})
@XmlRootElement
@XmlRootElement
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
public
class
EventObject
{
public
class
EventObject
{
public
enum
ObjectKind
{
public
static
enum
ObjectKind
{
MERGE_REQUEST
,
ISSUE
,
MERGE_REQUEST
,
PUSH
;
ISSUE
;
@Override
public
String
toString
()
{
public
String
toString
()
{
return
(
name
().
toLowerCase
());
return
(
name
().
toLowerCase
());
}
}
}
}
private
EventObjectAttributes
objectAttributes
;
private
ObjectKind
objectKind
;
public
EventObjectAttributes
getObjectAttributes
()
{
return
this
.
objectAttributes
;
}
public
void
setObjectAttributes
(
EventObjectAttributes
objectAttributes
)
{
private
ObjectKind
objectKind
;
this
.
objectAttributes
=
objectAttributes
;
}
public
ObjectKind
getObjectKind
()
{
public
ObjectKind
getObjectKind
()
{
return
this
.
objectKind
;
return
this
.
objectKind
;
}
}
public
void
setObjectKind
(
ObjectKind
objectKind
)
{
public
void
setObjectKind
(
ObjectKind
objectKind
)
{
this
.
objectKind
=
objectKind
;
this
.
objectKind
=
objectKind
;
}
}
}
}
src/main/java/com/messners/gitlab/api/webhook/EventObjectAttributes.java
View file @
a28fc55f
...
@@ -7,187 +7,187 @@ import javax.xml.bind.annotation.XmlAccessorType;
...
@@ -7,187 +7,187 @@ import javax.xml.bind.annotation.XmlAccessorType;
import
javax.xml.bind.annotation.XmlRootElement
;
import
javax.xml.bind.annotation.XmlRootElement
;
@XmlRootElement
(
name
=
"object_attributes"
)
@XmlRootElement
(
name
=
"object_attributes"
)
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
public
class
EventObjectAttributes
{
public
class
EventObjectAttributes
{
private
Integer
assigneeId
;
private
Integer
assigneeId
;
private
Integer
authorId
;
private
Integer
authorId
;
private
String
branchName
;
private
String
branchName
;
private
Date
createdAt
;
private
Date
createdAt
;
private
String
description
;
private
String
description
;
private
Integer
id
;
private
Integer
id
;
private
Integer
iid
;
private
Integer
iid
;
private
String
mergeStatus
;
private
String
mergeStatus
;
private
String
milestoneId
;
private
String
milestoneId
;
private
Integer
position
;
private
Integer
position
;
private
Integer
projectId
;
private
Integer
projectId
;
private
String
sourceBranch
;
private
String
sourceBranch
;
private
Integer
sourceProjectId
;
private
Integer
sourceProjectId
;
private
String
stCommits
;
private
String
stCommits
;
private
String
stDiffs
;
private
String
stDiffs
;
private
String
state
;
private
String
state
;
private
String
targetBranch
;
private
String
targetBranch
;
private
Integer
targetProjectId
;
private
Integer
targetProjectId
;
private
String
title
;
private
String
title
;
private
Date
updatedAt
;
private
Date
updatedAt
;
public
Integer
getAssigneeId
()
{
public
Integer
getAssigneeId
()
{
return
this
.
assigneeId
;
return
this
.
assigneeId
;
}
}
public
void
setAssigneeId
(
Integer
assigneeId
)
{
public
void
setAssigneeId
(
Integer
assigneeId
)
{
this
.
assigneeId
=
assigneeId
;
this
.
assigneeId
=
assigneeId
;
}
}
public
Integer
getAuthorId
()
{
public
Integer
getAuthorId
()
{
return
this
.
authorId
;
return
this
.
authorId
;
}
}
public
void
setAuthorId
(
Integer
authorId
)
{
public
void
setAuthorId
(
Integer
authorId
)
{
this
.
authorId
=
authorId
;
this
.
authorId
=
authorId
;
}
}
public
String
getBranchName
()
{
public
String
getBranchName
()
{
return
this
.
branchName
;
return
this
.
branchName
;
}
}
public
void
setBranchName
(
String
branchName
)
{
public
void
setBranchName
(
String
branchName
)
{
this
.
branchName
=
branchName
;
this
.
branchName
=
branchName
;
}
}
public
Date
getCreatedAt
()
{
public
Date
getCreatedAt
()
{
return
this
.
createdAt
;
return
this
.
createdAt
;
}
}
public
void
setCreatedAt
(
Date
createdAt
)
{
public
void
setCreatedAt
(
Date
createdAt
)
{
this
.
createdAt
=
createdAt
;
this
.
createdAt
=
createdAt
;
}
}
public
String
getDescription
()
{
public
String
getDescription
()
{
return
this
.
description
;
return
this
.
description
;
}
}
public
void
setDescription
(
String
description
)
{
public
void
setDescription
(
String
description
)
{
this
.
description
=
description
;
this
.
description
=
description
;
}
}
public
Integer
getId
()
{
public
Integer
getId
()
{
return
this
.
id
;
return
this
.
id
;
}
}
public
void
setId
(
Integer
id
)
{
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
this
.
id
=
id
;
}
}
public
Integer
getIid
()
{
public
Integer
getIid
()
{
return
this
.
iid
;
return
this
.
iid
;
}
}
public
void
setIid
(
Integer
iid
)
{
public
void
setIid
(
Integer
iid
)
{
this
.
iid
=
iid
;
this
.
iid
=
iid
;
}
}
public
String
getMergeStatus
()
{
public
String
getMergeStatus
()
{
return
this
.
mergeStatus
;
return
this
.
mergeStatus
;
}
}
public
void
setMergeStatus
(
String
mergeStatus
)
{
public
void
setMergeStatus
(
String
mergeStatus
)
{
this
.
mergeStatus
=
mergeStatus
;
this
.
mergeStatus
=
mergeStatus
;
}
}
public
String
getMilestoneId
()
{
public
String
getMilestoneId
()
{
return
this
.
milestoneId
;
return
this
.
milestoneId
;
}
}
public
void
setMilestoneId
(
String
milestoneId
)
{
public
void
setMilestoneId
(
String
milestoneId
)
{
this
.
milestoneId
=
milestoneId
;
this
.
milestoneId
=
milestoneId
;
}
}
public
Integer
getPosition
()
{
public
Integer
getPosition
()
{
return
this
.
position
;
return
this
.
position
;
}
}
public
void
setPosition
(
Integer
position
)
{
public
void
setPosition
(
Integer
position
)
{
this
.
position
=
position
;
this
.
position
=
position
;
}
}
public
Integer
getProjectId
()
{
public
Integer
getProjectId
()
{
return
this
.
projectId
;
return
this
.
projectId
;
}
}
public
void
setProjectId
(
Integer
projectId
)
{
public
void
setProjectId
(
Integer
projectId
)
{
this
.
projectId
=
projectId
;
this
.
projectId
=
projectId
;
}
}
public
String
getSourceBranch
()
{
public
String
getSourceBranch
()
{
return
this
.
sourceBranch
;
return
this
.
sourceBranch
;
}
}
public
void
setSourceBranch
(
String
sourceBranch
)
{
public
void
setSourceBranch
(
String
sourceBranch
)
{
this
.
sourceBranch
=
sourceBranch
;
this
.
sourceBranch
=
sourceBranch
;
}
}
public
Integer
getSourceProjectId
()
{
public
Integer
getSourceProjectId
()
{
return
this
.
sourceProjectId
;
return
this
.
sourceProjectId
;
}
}
public
void
setSourceProjectId
(
Integer
sourceProjectId
)
{
public
void
setSourceProjectId
(
Integer
sourceProjectId
)
{
this
.
sourceProjectId
=
sourceProjectId
;
this
.
sourceProjectId
=
sourceProjectId
;
}
}
public
String
getStCommits
()
{
public
String
getStCommits
()
{
return
this
.
stCommits
;
return
this
.
stCommits
;
}
}
public
void
setStCommits
(
String
stCommits
)
{
public
void
setStCommits
(
String
stCommits
)
{
this
.
stCommits
=
stCommits
;
this
.
stCommits
=
stCommits
;
}
}
public
String
getStDiffs
()
{
public
String
getStDiffs
()
{
return
this
.
stDiffs
;
return
this
.
stDiffs
;
}
}
public
void
setStDiffs
(
String
stDiffs
)
{
public
void
setStDiffs
(
String
stDiffs
)
{
this
.
stDiffs
=
stDiffs
;
this
.
stDiffs
=
stDiffs
;
}
}
public
String
getState
()
{
public
String
getState
()
{
return
this
.
state
;
return
this
.
state
;
}
}
public
void
setState
(
String
state
)
{
public
void
setState
(
String
state
)
{
this
.
state
=
state
;
this
.
state
=
state
;
}
}
public
String
getTargetBranch
()
{
public
String
getTargetBranch
()
{
return
this
.
targetBranch
;
return
this
.
targetBranch
;
}
}
public
void
setTargetBranch
(
String
targetBranch
)
{
public
void
setTargetBranch
(
String
targetBranch
)
{
this
.
targetBranch
=
targetBranch
;
this
.
targetBranch
=
targetBranch
;
}
}
public
Integer
getTargetProjectId
()
{
public
Integer
getTargetProjectId
()
{
return
this
.
targetProjectId
;
return
this
.
targetProjectId
;
}
}
public
void
setTargetProjectId
(
Integer
targetProjectId
)
{
public
void
setTargetProjectId
(
Integer
targetProjectId
)
{
this
.
targetProjectId
=
targetProjectId
;
this
.
targetProjectId
=
targetProjectId
;
}
}
public
String
getTitle
()
{
public
String
getTitle
()
{
return
this
.
title
;
return
this
.
title
;
}
}
public
void
setTitle
(
String
title
)
{
public
void
setTitle
(
String
title
)
{
this
.
title
=
title
;
this
.
title
=
title
;
}
}
public
Date
getUpdatedAt
()
{
public
Date
getUpdatedAt
()
{
return
this
.
updatedAt
;
return
this
.
updatedAt
;
}
}
public
void
setUpdatedAt
(
Date
updatedAt
)
{
public
void
setUpdatedAt
(
Date
updatedAt
)
{
this
.
updatedAt
=
updatedAt
;
this
.
updatedAt
=
updatedAt
;
}
}
}
}
src/main/java/com/messners/gitlab/api/webhook/PushEvent.java
View file @
a28fc55f
...
@@ -5,26 +5,32 @@ import java.util.List;
...
@@ -5,26 +5,32 @@ import java.util.List;
import
javax.xml.bind.annotation.XmlAccessType
;
import
javax.xml.bind.annotation.XmlAccessType
;
import
javax.xml.bind.annotation.XmlAccessorType
;
import
javax.xml.bind.annotation.XmlAccessorType
;
import
javax.xml.bind.annotation.XmlRootElement
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.messners.gitlab.api.models.Commit
;
import
com.messners.gitlab.api.models.Commit
;
import
com.messners.gitlab.api.models.Project
;
import
com.messners.gitlab.api.models.Repository
;
import
com.messners.gitlab.api.models.Repository
;
@XmlRootElement
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
public
class
PushEvent
{
public
class
PushEvent
extends
EventObject
{
public
static
final
String
OBJECT_KIND
=
"push"
;
private
String
after
;
private
String
after
;
private
String
before
;
private
String
before
;
private
List
<
Commit
>
commits
;
private
Integer
projectId
;
private
String
ref
;
private
String
ref
;
private
Repository
repository
;
private
String
checkoutSha
;
private
Integer
totalCommitsCount
;
private
Integer
userId
;
private
Integer
userId
;
private
String
userName
;
private
String
userName
;
private
String
userEmail
;
private
String
userAvatar
;
private
Integer
projectId
;
private
Project
project
;
private
Repository
repository
;
private
List
<
Commit
>
commits
;
private
Integer
totalCommitsCount
;
public
String
getAfter
()
{
public
String
getAfter
()
{
return
this
.
after
;
return
this
.
after
;
...
@@ -41,13 +47,53 @@ public class PushEvent {
...
@@ -41,13 +47,53 @@ public class PushEvent {
public
void
setBefore
(
String
before
)
{
public
void
setBefore
(
String
before
)
{
this
.
before
=
before
;
this
.
before
=
before
;
}
}
public
String
getRef
()
{
return
this
.
ref
;
}
public
List
<
Commit
>
getCommits
(
)
{
public
void
setRef
(
String
ref
)
{
return
this
.
commits
;
this
.
ref
=
ref
;
}
}
public
void
setCommits
(
List
<
Commit
>
commits
)
{
public
String
getCheckoutSha
()
{
this
.
commits
=
commits
;
return
checkoutSha
;
}
public
void
setCheckoutSha
(
String
checkoutSha
)
{
this
.
checkoutSha
=
checkoutSha
;
}
public
Integer
getUserId
()
{
return
this
.
userId
;
}
public
void
setUserId
(
Integer
userId
)
{
this
.
userId
=
userId
;
}
public
String
getUserName
()
{
return
this
.
userName
;
}
public
void
setUserName
(
String
userName
)
{
this
.
userName
=
userName
;
}
public
String
getUserEmail
()
{
return
userEmail
;
}
public
void
setUserEmail
(
String
userEmail
)
{
this
.
userEmail
=
userEmail
;
}
public
String
getUserAvatar
()
{
return
userAvatar
;
}
public
void
setUserAvatar
(
String
userAvatar
)
{
this
.
userAvatar
=
userAvatar
;
}
}
public
Integer
getProjectId
()
{
public
Integer
getProjectId
()
{
...
@@ -58,12 +104,12 @@ public class PushEvent {
...
@@ -58,12 +104,12 @@ public class PushEvent {
this
.
projectId
=
projectId
;
this
.
projectId
=
projectId
;
}
}
public
String
getRef
()
{
public
Project
getProject
()
{
return
this
.
ref
;
return
project
;
}
}
public
void
set
Ref
(
String
ref
)
{
public
void
set
Project
(
Project
project
)
{
this
.
ref
=
ref
;
this
.
project
=
project
;
}
}
public
Repository
getRepository
()
{
public
Repository
getRepository
()
{
...
@@ -73,6 +119,14 @@ public class PushEvent {
...
@@ -73,6 +119,14 @@ public class PushEvent {
public
void
setRepository
(
Repository
repository
)
{
public
void
setRepository
(
Repository
repository
)
{
this
.
repository
=
repository
;
this
.
repository
=
repository
;
}
}
public
List
<
Commit
>
getCommits
()
{
return
this
.
commits
;
}
public
void
setCommits
(
List
<
Commit
>
commits
)
{
this
.
commits
=
commits
;
}
public
Integer
getTotalCommitsCount
()
{
public
Integer
getTotalCommitsCount
()
{
return
this
.
totalCommitsCount
;
return
this
.
totalCommitsCount
;
...
@@ -82,22 +136,7 @@ public class PushEvent {
...
@@ -82,22 +136,7 @@ public class PushEvent {
this
.
totalCommitsCount
=
totalCommitsCount
;
this
.
totalCommitsCount
=
totalCommitsCount
;
}
}
public
Integer
getUserId
()
{
return
this
.
userId
;
}
public
void
setUserId
(
Integer
userId
)
{
this
.
userId
=
userId
;
}
public
String
getUserName
()
{
return
this
.
userName
;
}
public
void
setUserName
(
String
userName
)
{
this
.
userName
=
userName
;
}
/**
/**
* Gets the branch name from the ref. Will return null if the ref does not start with "refs/heads/".
* Gets the branch name from the ref. Will return null if the ref does not start with "refs/heads/".
*
*
...
...
src/test/java/com/messners/gitlab/api/TestGitLabApiBeans.java
View file @
a28fc55f
...
@@ -14,8 +14,9 @@ import com.fasterxml.jackson.core.type.TypeReference;
...
@@ -14,8 +14,9 @@ import com.fasterxml.jackson.core.type.TypeReference;
import
com.fasterxml.jackson.databind.JsonMappingException
;
import
com.fasterxml.jackson.databind.JsonMappingException
;
import
com.fasterxml.jackson.databind.JsonNode
;
import
com.fasterxml.jackson.databind.JsonNode
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.fasterxml.jackson.databind.SerializationFeature
;
import
com.messners.gitlab.api.models.Branch
;
import
com.messners.gitlab.api.models.Branch
;
import
com.messners.gitlab.api.models.Commit
;
import
com.messners.gitlab.api.models.Diff
;
import
com.messners.gitlab.api.models.Diff
;
import
com.messners.gitlab.api.models.Event
;
import
com.messners.gitlab.api.models.Event
;
import
com.messners.gitlab.api.models.Group
;
import
com.messners.gitlab.api.models.Group
;
...
@@ -23,7 +24,6 @@ import com.messners.gitlab.api.models.Issue;
...
@@ -23,7 +24,6 @@ import com.messners.gitlab.api.models.Issue;
import
com.messners.gitlab.api.models.Key
;
import
com.messners.gitlab.api.models.Key
;
import
com.messners.gitlab.api.models.Member
;
import
com.messners.gitlab.api.models.Member
;
import
com.messners.gitlab.api.models.MergeRequest
;
import
com.messners.gitlab.api.models.MergeRequest
;
import
com.messners.gitlab.api.models.MergeRequestComment
;
import
com.messners.gitlab.api.models.Milestone
;
import
com.messners.gitlab.api.models.Milestone
;
import
com.messners.gitlab.api.models.Note
;
import
com.messners.gitlab.api.models.Note
;
import
com.messners.gitlab.api.models.Project
;
import
com.messners.gitlab.api.models.Project
;
...
@@ -46,6 +46,7 @@ public class TestGitLabApiBeans {
...
@@ -46,6 +46,7 @@ public class TestGitLabApiBeans {
@BeforeClass
@BeforeClass
public
static
void
setup
()
{
public
static
void
setup
()
{
jacksonJson
=
new
JacksonJson
();
jacksonJson
=
new
JacksonJson
();
jacksonJson
.
getObjectMapper
().
configure
(
SerializationFeature
.
ORDER_MAP_ENTRIES_BY_KEYS
,
true
);
}
}
@Test
@Test
...
@@ -57,7 +58,17 @@ public class TestGitLabApiBeans {
...
@@ -57,7 +58,17 @@ public class TestGitLabApiBeans {
branch
=
makeFakeApiCall
(
Branch
.
class
,
"bad-branch"
);
branch
=
makeFakeApiCall
(
Branch
.
class
,
"bad-branch"
);
assertTrue
(!
Branch
.
isValid
(
branch
));
assertTrue
(!
Branch
.
isValid
(
branch
));
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
@Test
public
void
testCommit
()
{
try
{
Commit
commit
=
makeFakeApiCall
(
Commit
.
class
,
"commit"
);
assertTrue
(
compareJson
(
commit
,
"commit"
));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
...
@@ -139,7 +150,7 @@ public class TestGitLabApiBeans {
...
@@ -139,7 +150,7 @@ public class TestGitLabApiBeans {
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
}
}
/*
@Test
@Test
public void testMergeRequestComment() {
public void testMergeRequestComment() {
...
@@ -150,7 +161,7 @@ public class TestGitLabApiBeans {
...
@@ -150,7 +161,7 @@ public class TestGitLabApiBeans {
e.printStackTrace();
e.printStackTrace();
}
}
}
}
*/
@Test
@Test
public
void
testMergeRequest
()
{
public
void
testMergeRequest
()
{
...
...
src/test/resources/com/messners/gitlab/api/branch.json
View file @
a28fc55f
{
{
"name"
:
"master"
,
"name"
:
"master"
,
"
commit"
:
{
"
merged"
:
false
,
"id"
:
"7b5c3cc8be40ee161ae89a06bba6229da1032a0c"
,
"protected"
:
true
,
"parents"
:
[{
"id"
:
"4ad91d3c1144c406e50c7b33bae684bd6837faf8"
}]
,
"developers_can_push"
:
false
,
"tree"
:
"46e82de44b1061621357f24c05515327f2795a95"
,
"developers_can_merge"
:
false
,
"message"
:
"add projects API"
,
"commit"
:
{
"author
"
:
{
"author
_email"
:
"john@example.com"
,
"name"
:
"John Smith"
,
"
author_
name"
:
"John Smith"
,
"
email"
:
"john@example.com"
"
authored_date"
:
"2012-06-27T05:51:39Z"
,
}
,
"committed_date"
:
"2012-06-28T03:44:20Z"
,
"committer
"
:
{
"committer
_email"
:
"john@example.com"
,
"name"
:
"John Smith"
,
"
committer_
name"
:
"John Smith"
,
"
email"
:
"john@example.com"
"
id"
:
"7b5c3cc8be40ee161ae89a06bba6229da1032a0c"
,
}
,
"message"
:
"add projects API"
,
"authored_date"
:
"2012-06-27T12:51:39Z"
,
"parent_ids"
:
[
"
committed_date"
:
"2012-06-28T10:44:20Z
"
"
4ad91d3c1144c406e50c7b33bae684bd6837faf8
"
},
]
"protected"
:
true
}
}
}
src/test/resources/com/messners/gitlab/api/commit.json
View file @
a28fc55f
{
{
"id"
:
"ed899a2f4b50b4370feeea94676502b42383c746"
,
"id"
:
"6104942438c14ec7bd21c6cd5bd995272b3faff6"
,
"short_id"
:
"ed899a2f4b5"
,
"short_id"
:
"6104942438c"
,
"title"
:
"Replace sanitize with escape once"
,
"title"
:
"Sanitize for network graph"
,
"author_name"
:
"Dmitriy Zaporozhets"
,
"author_name"
:
"randx"
,
"author_email"
:
"dzaporozhets@sphereconsultinginc.com"
,
"author_email"
:
"dmitriy.zaporozhets@gmail.com"
,
"created_at"
:
"2012-09-20T08:50:22Z"
"committer_name"
:
"Dmitriy"
,
"committer_email"
:
"dmitriy.zaporozhets@gmail.com"
,
"created_at"
:
"2012-09-20T06:06:12Z"
,
"message"
:
"Sanitize for network graph"
,
"committed_date"
:
"2012-09-20T06:06:12Z"
,
"authored_date"
:
"2012-09-20T06:06:12Z"
,
"parent_ids"
:
[
"ae1d9fb46aa2b07ee9836d49862ec4e2c46fbbba"
],
"stats"
:
{
"additions"
:
15
,
"deletions"
:
10
,
"total"
:
25
},
"status"
:
"running"
}
}
src/test/resources/com/messners/gitlab/api/event-object.json
View file @
a28fc55f
...
@@ -16,6 +16,6 @@
...
@@ -16,6 +16,6 @@
"state"
:
"opened"
,
"state"
:
"opened"
,
"iid"
:
23
,
"iid"
:
23
,
"merge_status"
:
"unchecked"
,
"merge_status"
:
"unchecked"
,
"target_project_id"
:
14
,
"target_project_id"
:
14
}
}
}
}
src/test/resources/com/messners/gitlab/api/event.json
View file @
a28fc55f
{
{
"project_id"
:
15
,
"title"
:
"this is a title"
,
"action_name"
:
"opened"
,
"project_id"
:
15
,
"author_id"
:
1
,
"action_name"
:
"opened"
,
"data"
:
{
"target_id"
:
830
,
"before"
:
"50d4420237a9de7be1304607147aec22e4a14af7"
,
"target_type"
:
"Issue"
,
"after"
:
"c5feabde2d8cd023215af4d2ceeb7a64839fc428"
,
"author_id"
:
1
,
"ref"
:
"refs/heads/master"
,
"author"
:
{
"user_id"
:
1
,
"name"
:
"Dmitriy Zaporozhets"
,
"user_name"
:
"Dmitriy Zaporozhets"
,
"username"
:
"root"
,
"repository"
:
{
"id"
:
1
,
"name"
:
"gitlabhq"
,
"state"
:
"active"
,
"url"
:
"git@dev.gitlab.org:gitlab/gitlabhq.git"
,
"avatar_url"
:
"http://localhost:3000/uploads/user/avatar/1/fox_avatar.png"
,
"description"
:
"GitLab: self hosted Git management software.
\r\n
Distributed under the MIT License."
,
"web_url"
:
"http://localhost:3000/root"
"homepage"
:
"https://dev.gitlab.org/gitlab/gitlabhq"
},
},
"commits"
:
[{
"author_username"
:
"john"
,
"id"
:
"c5feabde2d8cd023215af4d2ceeb7a64839fc428"
,
"data"
:
{
"message"
:
"Add simple search to projects in public area"
,
"before"
:
"50d4420237a9de7be1304607147aec22e4a14af7"
,
"timestamp"
:
"2013-05-13T18:18:08Z"
,
"after"
:
"c5feabde2d8cd023215af4d2ceeb7a64839fc428"
,
"url"
:
"https://dev.gitlab.org/gitlab/gitlabhq/commit/c5feabde2d8cd023215af4d2ceeb7a64839fc428"
,
"ref"
:
"refs/heads/master"
,
"author"
:
{
"user_id"
:
1
,
"name"
:
"Dmitriy Zaporozhets"
,
"user_name"
:
"Dmitriy Zaporozhets"
,
"email"
:
"dmitriy.zaporozhets@gmail.com"
"repository"
:
{
}
"name"
:
"gitlabhq"
,
}],
"url"
:
"git@dev.gitlab.org:gitlab/gitlabhq.git"
,
"total_commits_count"
:
1
"description"
:
"GitLab: self hosted Git management software.
\r\n
Distributed under the MIT License."
,
}
"homepage"
:
"https://dev.gitlab.org/gitlab/gitlabhq"
}
},
"commits"
:
[
{
"id"
:
"c5feabde2d8cd023215af4d2ceeb7a64839fc428"
,
"message"
:
"Add simple search to projects in public area"
,
"timestamp"
:
"2013-05-13T18:18:08Z"
,
"url"
:
"https://dev.gitlab.org/gitlab/gitlabhq/commit/c5feabde2d8cd023215af4d2ceeb7a64839fc428"
,
"author"
:
{
"name"
:
"Dmitriy Zaporozhets"
,
"email"
:
"dmitriy.zaporozhets@gmail.com"
}
}
],
"total_commits_count"
:
1
},
"target_title"
:
"target title"
}
\ No newline at end of file
src/test/resources/com/messners/gitlab/api/hook.json
View file @
a28fc55f
...
@@ -5,5 +5,11 @@
...
@@ -5,5 +5,11 @@
"push_events"
:
true
,
"push_events"
:
true
,
"issues_events"
:
true
,
"issues_events"
:
true
,
"merge_requests_events"
:
true
,
"merge_requests_events"
:
true
,
"tag_push_events"
:
true
,
"note_events"
:
true
,
"build_events"
:
true
,
"pipeline_events"
:
true
,
"wiki_page_events"
:
true
,
"enable_ssl_verification"
:
true
,
"created_at"
:
"2012-10-12T17:04:47Z"
"created_at"
:
"2012-10-12T17:04:47Z"
}
}
\ No newline at end of file
src/test/resources/com/messners/gitlab/api/issue.json
View file @
a28fc55f
{
{
"id"
:
4
2
,
"
project_
id"
:
4
,
"iid"
:
4
,
"milestone"
:
{
"project_id"
:
8
,
"project_id"
:
4
,
"titl
e"
:
"
Add user settings
"
,
"stat
e"
:
"
closed
"
,
"description"
:
""
,
"description"
:
"
Rerum est voluptatem provident consequuntur molestias similique ipsum dolor.
"
,
"labels"
:
[
"iid"
:
3
,
"
feature"
"
id"
:
11
,
]
,
"title"
:
"v3.0"
,
"milestone"
:
{
"created_at"
:
"2016-01-04T15:31:39.788Z"
,
"
id"
:
1
,
"
updated_at"
:
"2016-01-04T15:31:39.788Z"
"title"
:
"v1.0"
,
}
,
"
description"
:
""
,
"
author"
:
{
"
due_d
ate"
:
"
2012-07-20T00:00:00Z
"
,
"
st
ate"
:
"
active
"
,
"
state"
:
"reopenend
"
,
"
web_url"
:
"https://gitlab.example.com/root
"
,
"u
pdated_at"
:
"2012-07-04T13:42:48Z
"
,
"u
sername"
:
"root
"
,
"
created_at"
:
"2012-07-04T13:42:48Z"
"
id"
:
1
,
},
"name"
:
"Administrator"
"assignee"
:
{
},
"id"
:
2
,
"description"
:
"Omnis vero earum sunt corporis dolor et placeat."
,
"
usernam
e"
:
"
jack_smith
"
,
"
stat
e"
:
"
closed
"
,
"
email"
:
"jack@example.com"
,
"
iid"
:
1
,
"
name"
:
"Jack Smith"
,
"
assignee"
:
{
"
state"
:
"activ
e"
,
"
web_url"
:
"https://gitlab.example.com/lenni
e"
,
"
created_at"
:
"2012-05-23T08:01:01Z"
"
state"
:
"active"
,
}
,
"username"
:
"lennie"
,
"author"
:
{
"id"
:
9
,
"
id"
:
1
,
"
name"
:
"Dr. Luella Kovacek"
"username"
:
"john_smith"
,
}
,
"
email"
:
"john@example.com"
,
"
labels"
:
[]
,
"
name"
:
"John Smith"
,
"
id"
:
41
,
"
stat
e"
:
"
active
"
,
"
titl
e"
:
"
Ut commodi ullam eos dolores perferendis nihil sunt.
"
,
"
cre
ated_at"
:
"201
2
-0
5-23T08:00:58
Z"
"
upd
ated_at"
:
"201
6
-0
1-04T15:31:46.176
Z"
,
}
,
"created_at"
:
"2016-01-04T15:31:46.176Z"
,
"s
tate"
:
"opened"
,
"s
ubscribed"
:
false
,
"u
pdated_at"
:
"2012-07-12T13:43:19Z"
,
"u
ser_notes_count"
:
1
,
"created_at"
:
"2012-06-28T12:58:06Z"
"web_url"
:
"http://example.com/example/example/issues/1"
,
}
"confidential"
:
false
}
\ No newline at end of file
src/test/resources/com/messners/gitlab/api/key.json
View file @
a28fc55f
{
{
"id"
:
1
,
"id"
:
1
,
"title"
:
"Public key"
,
"title"
:
"Sample key 25"
,
"key"
:
"ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAiPWx6WM4lhHNedGfBpPJNPpZ7yKu+dnn1SJejgt4596k6YjzGGphH2TUxwKzxcKDKKezwkpfnxPkSMkuEspGRt/aZZ9wa++Oi7Qkr8prgHc4soW6NUlfDzpvZK2H5E7eQaSeP3SAwGmQKUFHCddNaP0L+hM7zhFNzjFvpaMgJw0="
,
"key"
:
"ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAiPWx6WM4lhHNedGfBpPJNPpZ7yKu+dnn1SJejgt1256k6YjzGGphH2TUxwKzxcKDKKezwkpfnxPkSMkuEspGRt/aZZ9wa++Oi7Qkr8prgHc4soW6NUlfDzpvZK2H5E7eQaSeP3SAwGmQKUFHCddNaP0L+hM7zhFNzjFvpaMgJw0="
,
"created_at"
:
"2013-10-02T11:12:29Z"
"created_at"
:
"2015-09-03T07:24:44.627Z"
,
"user"
:
{
"name"
:
"John Smith"
,
"username"
:
"john_smith"
,
"id"
:
25
,
"state"
:
"active"
,
"avatar_url"
:
"http://www.gravatar.com/avatar/cfa35b8cd2ec278026357769582fa563?s=40
\u
0026d=identicon"
,
"web_url"
:
"http://localhost:3000/john_smith"
,
"created_at"
:
"2015-09-03T07:24:01.670Z"
,
"is_admin"
:
false
,
"skype"
:
""
,
"linkedin"
:
""
,
"twitter"
:
""
,
"email"
:
"john@example.com"
,
"theme_id"
:
2
,
"color_scheme_id"
:
1
,
"projects_limit"
:
10
,
"identities"
:
[],
"can_create_group"
:
true
,
"can_create_project"
:
true
,
"two_factor_enabled"
:
false
}
}
}
Prev
1
2
3
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment