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
c987485b
Commit
c987485b
authored
May 16, 2019
by
Greg Messner
Browse files
No longer used, replaced by Job event related classes (#357).
parent
0fc627a2
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/gitlab4j/api/webhook/BuildEvent.java
deleted
100644 → 0
View file @
0fc627a2
package
org.gitlab4j.api.webhook
;
import
java.util.Date
;
import
org.gitlab4j.api.models.User
;
import
org.gitlab4j.api.utils.JacksonJson
;
public
class
BuildEvent
extends
AbstractEvent
{
/** X-Gitlab-Event header value pre GitLab v9.3.0 */
public
static
final
String
BUILD_HOOK_X_GITLAB_EVENT
=
"Build Hook"
;
/** X-Gitlab-Event header value post GitLab v9.3.0 */
public
static
final
String
JOB_HOOK_X_GITLAB_EVENT
=
"Job Hook"
;
public
static
final
String
OBJECT_KIND
=
"build"
;
private
String
ref
;
private
Boolean
tag
;
private
String
beforeSha
;
private
String
sha
;
private
Integer
buildId
;
private
String
buildName
;
private
String
buildStage
;
private
String
buildStatus
;
private
Date
buildStarted_at
;
private
Date
buildFinished_at
;
private
Integer
buildDuration
;
private
Boolean
buildAllowFailure
;
private
Integer
projectId
;
private
String
projectName
;
private
User
user
;
private
BuildEventCommit
commit
;
private
EventRepository
repository
;
public
String
getObjectKind
()
{
return
(
OBJECT_KIND
);
}
public
void
setObjectKind
(
String
objectKind
)
{
if
(!
OBJECT_KIND
.
equals
(
objectKind
))
throw
new
RuntimeException
(
"Invalid object_kind ("
+
objectKind
+
"), must be '"
+
OBJECT_KIND
+
"'"
);
}
public
String
getRef
()
{
return
ref
;
}
public
void
setRef
(
String
ref
)
{
this
.
ref
=
ref
;
}
public
Boolean
getTag
()
{
return
tag
;
}
public
void
setTag
(
Boolean
tag
)
{
this
.
tag
=
tag
;
}
public
String
getBeforeSha
()
{
return
beforeSha
;
}
public
void
setBeforeSha
(
String
beforeSha
)
{
this
.
beforeSha
=
beforeSha
;
}
public
String
getSha
()
{
return
sha
;
}
public
void
setSha
(
String
sha
)
{
this
.
sha
=
sha
;
}
public
Integer
getBuildId
()
{
return
buildId
;
}
public
void
setBuildId
(
Integer
buildId
)
{
this
.
buildId
=
buildId
;
}
public
String
getBuildName
()
{
return
buildName
;
}
public
void
setBuildName
(
String
buildName
)
{
this
.
buildName
=
buildName
;
}
public
String
getBuildStage
()
{
return
buildStage
;
}
public
void
setBuildStage
(
String
buildStage
)
{
this
.
buildStage
=
buildStage
;
}
public
String
getBuildStatus
()
{
return
buildStatus
;
}
public
void
setBuildStatus
(
String
buildStatus
)
{
this
.
buildStatus
=
buildStatus
;
}
public
Date
getBuildStarted_at
()
{
return
buildStarted_at
;
}
public
void
setBuildStarted_at
(
Date
buildStarted_at
)
{
this
.
buildStarted_at
=
buildStarted_at
;
}
public
Date
getBuildFinished_at
()
{
return
buildFinished_at
;
}
public
void
setBuildFinished_at
(
Date
buildFinished_at
)
{
this
.
buildFinished_at
=
buildFinished_at
;
}
public
Integer
getBuildDuration
()
{
return
buildDuration
;
}
public
void
setBuildDuration
(
Integer
buildDuration
)
{
this
.
buildDuration
=
buildDuration
;
}
public
Boolean
getBuildAllowFailure
()
{
return
buildAllowFailure
;
}
public
void
setBuildAllowFailure
(
Boolean
buildAllowFailure
)
{
this
.
buildAllowFailure
=
buildAllowFailure
;
}
public
Integer
getProjectId
()
{
return
projectId
;
}
public
void
setProjectId
(
Integer
projectId
)
{
this
.
projectId
=
projectId
;
}
public
String
getProjectName
()
{
return
projectName
;
}
public
void
setProjectName
(
String
projectName
)
{
this
.
projectName
=
projectName
;
}
public
User
getUser
()
{
return
user
;
}
public
void
setUser
(
User
user
)
{
this
.
user
=
user
;
}
public
BuildEventCommit
getCommit
()
{
return
commit
;
}
public
void
setCommit
(
BuildEventCommit
commit
)
{
this
.
commit
=
commit
;
}
public
EventRepository
getRepository
()
{
return
repository
;
}
public
void
setRepository
(
EventRepository
repository
)
{
this
.
repository
=
repository
;
}
@Override
public
String
toString
()
{
return
(
JacksonJson
.
toJsonString
(
this
));
}
}
src/main/java/org/gitlab4j/api/webhook/BuildEventCommit.java
deleted
100644 → 0
View file @
0fc627a2
package
org.gitlab4j.api.webhook
;
import
java.util.Date
;
import
org.gitlab4j.api.utils.JacksonJson
;
public
class
BuildEventCommit
{
private
Integer
id
;
private
String
sha
;
private
String
message
;
private
String
authorName
;
private
String
authorEmail
;
private
String
status
;
private
Integer
duration
;
private
Date
startedAt
;
private
Date
finishedAt
;
public
Integer
getId
()
{
return
id
;
}
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
public
String
getSha
()
{
return
sha
;
}
public
void
setSha
(
String
sha
)
{
this
.
sha
=
sha
;
}
public
String
getMessage
()
{
return
message
;
}
public
void
setMessage
(
String
message
)
{
this
.
message
=
message
;
}
public
String
getAuthorName
()
{
return
authorName
;
}
public
void
setAuthorName
(
String
authorName
)
{
this
.
authorName
=
authorName
;
}
public
String
getAuthorEmail
()
{
return
authorEmail
;
}
public
void
setAuthorEmail
(
String
authorEmail
)
{
this
.
authorEmail
=
authorEmail
;
}
public
String
getStatus
()
{
return
status
;
}
public
void
setStatus
(
String
status
)
{
this
.
status
=
status
;
}
public
Integer
getDuration
()
{
return
duration
;
}
public
void
setDuration
(
Integer
duration
)
{
this
.
duration
=
duration
;
}
public
Date
getStartedAt
()
{
return
startedAt
;
}
public
void
setStartedAt
(
Date
startedAt
)
{
this
.
startedAt
=
startedAt
;
}
public
Date
getFinishedAt
()
{
return
finishedAt
;
}
public
void
setFinishedAt
(
Date
finishedAt
)
{
this
.
finishedAt
=
finishedAt
;
}
@Override
public
String
toString
()
{
return
(
JacksonJson
.
toJsonString
(
this
));
}
}
src/test/resources/org/gitlab4j/api/build-event.json
deleted
100644 → 0
View file @
0fc627a2
{
"object_kind"
:
"build"
,
"ref"
:
"gitlab-script-trigger"
,
"tag"
:
false
,
"before_sha"
:
"2293ada6b400935a1378653304eaf6221e0fdb8f"
,
"sha"
:
"2293ada6b400935a1378653304eaf6221e0fdb8f"
,
"build_id"
:
1977
,
"build_name"
:
"test"
,
"build_stage"
:
"test"
,
"build_status"
:
"created"
,
"build_allow_failure"
:
false
,
"project_id"
:
380
,
"project_name"
:
"gitlab-org/gitlab-test"
,
"user"
:
{
"id"
:
3
,
"name"
:
"User"
,
"email"
:
"user@gitlab.com"
},
"commit"
:
{
"id"
:
2366
,
"sha"
:
"2293ada6b400935a1378653304eaf6221e0fdb8f"
,
"message"
:
"test
\n
"
,
"author_name"
:
"User"
,
"author_email"
:
"user@gitlab.com"
,
"status"
:
"created"
},
"repository"
:
{
"name"
:
"gitlab_test"
,
"git_ssh_url"
:
"git@192.168.64.1:gitlab-org/gitlab-test.git"
,
"description"
:
"Atque in sunt eos similique dolores voluptatem."
,
"homepage"
:
"http://192.168.64.1:3005/gitlab-org/gitlab-test"
,
"git_http_url"
:
"http://192.168.64.1:3005/gitlab-org/gitlab-test.git"
,
"visibility_level"
:
20
}
}
\ No newline at end of file
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