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
8ff38545
Commit
8ff38545
authored
Oct 07, 2019
by
burt
Committed by
Greg Messner
Oct 06, 2019
Browse files
Added MergeRequestFilter.in and MergeRequestFilter.wip (#446)
parent
065c94bf
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/gitlab4j/api/Constants.java
View file @
8ff38545
...
@@ -350,6 +350,27 @@ public interface Constants {
...
@@ -350,6 +350,27 @@ public interface Constants {
}
}
}
}
/** Enum to use for specifying the scope of the search attribute when calling getMergeRequests(). */
public
enum
MergeRequestSearchIn
{
TITLE
,
DESCRIPTION
;
private
static
JacksonJsonEnumHelper
<
MergeRequestSearchIn
>
enumHelper
=
new
JacksonJsonEnumHelper
<>(
MergeRequestSearchIn
.
class
);
@JsonCreator
public
static
MergeRequestSearchIn
forValue
(
String
value
)
{
return
enumHelper
.
forValue
(
value
);
}
@JsonValue
public
String
toValue
()
{
return
(
enumHelper
.
toString
(
this
));
}
@Override
public
String
toString
()
{
return
(
enumHelper
.
toString
(
this
));
}
}
/** Enum to use for specifying the state of a merge request or issue update. */
/** Enum to use for specifying the state of a merge request or issue update. */
public
enum
StateEvent
{
public
enum
StateEvent
{
...
...
src/main/java/org/gitlab4j/api/models/MergeRequestFilter.java
View file @
8ff38545
...
@@ -6,6 +6,7 @@ import java.util.List;
...
@@ -6,6 +6,7 @@ import java.util.List;
import
org.gitlab4j.api.Constants
;
import
org.gitlab4j.api.Constants
;
import
org.gitlab4j.api.Constants.MergeRequestOrderBy
;
import
org.gitlab4j.api.Constants.MergeRequestOrderBy
;
import
org.gitlab4j.api.Constants.MergeRequestScope
;
import
org.gitlab4j.api.Constants.MergeRequestScope
;
import
org.gitlab4j.api.Constants.MergeRequestSearchIn
;
import
org.gitlab4j.api.Constants.MergeRequestState
;
import
org.gitlab4j.api.Constants.MergeRequestState
;
import
org.gitlab4j.api.Constants.SortOrder
;
import
org.gitlab4j.api.Constants.SortOrder
;
import
org.gitlab4j.api.GitLabApiForm
;
import
org.gitlab4j.api.GitLabApiForm
;
...
@@ -36,6 +37,8 @@ public class MergeRequestFilter {
...
@@ -36,6 +37,8 @@ public class MergeRequestFilter {
private
String
sourceBranch
;
private
String
sourceBranch
;
private
String
targetBranch
;
private
String
targetBranch
;
private
String
search
;
private
String
search
;
private
MergeRequestSearchIn
in
;
private
Boolean
wip
;
public
Integer
getProjectId
()
{
public
Integer
getProjectId
()
{
return
projectId
;
return
projectId
;
...
@@ -284,6 +287,32 @@ public class MergeRequestFilter {
...
@@ -284,6 +287,32 @@ public class MergeRequestFilter {
return
(
this
);
return
(
this
);
}
}
public
MergeRequestSearchIn
getIn
()
{
return
in
;
}
public
void
setIn
(
MergeRequestSearchIn
in
)
{
this
.
in
=
in
;
}
public
MergeRequestFilter
withIn
(
MergeRequestSearchIn
in
)
{
this
.
in
=
in
;
return
(
this
);
}
public
Boolean
getWip
()
{
return
wip
;
}
public
void
setWip
(
Boolean
wip
)
{
this
.
wip
=
wip
;
}
public
MergeRequestFilter
withWip
(
Boolean
wip
)
{
this
.
wip
=
wip
;
return
(
this
);
}
@JsonIgnore
@JsonIgnore
public
GitLabApiForm
getQueryParams
(
int
page
,
int
perPage
)
{
public
GitLabApiForm
getQueryParams
(
int
page
,
int
perPage
)
{
return
(
getQueryParams
()
return
(
getQueryParams
()
...
@@ -291,7 +320,7 @@ public class MergeRequestFilter {
...
@@ -291,7 +320,7 @@ public class MergeRequestFilter {
.
withParam
(
Constants
.
PER_PAGE_PARAM
,
perPage
));
.
withParam
(
Constants
.
PER_PAGE_PARAM
,
perPage
));
}
}
@JsonIgnore
@JsonIgnore
public
GitLabApiForm
getQueryParams
()
{
public
GitLabApiForm
getQueryParams
()
{
return
(
new
GitLabApiForm
()
return
(
new
GitLabApiForm
()
.
withParam
(
"iids"
,
iids
)
.
withParam
(
"iids"
,
iids
)
...
@@ -310,6 +339,8 @@ public class MergeRequestFilter {
...
@@ -310,6 +339,8 @@ public class MergeRequestFilter {
.
withParam
(
"my_reaction_emoji"
,
myReactionEmoji
)
.
withParam
(
"my_reaction_emoji"
,
myReactionEmoji
)
.
withParam
(
"source_branch"
,
sourceBranch
)
.
withParam
(
"source_branch"
,
sourceBranch
)
.
withParam
(
"target_branch"
,
targetBranch
)
.
withParam
(
"target_branch"
,
targetBranch
)
.
withParam
(
"search"
,
search
));
.
withParam
(
"search"
,
search
)
.
withParam
(
"in"
,
in
)
.
withParam
(
"wip"
,
(
wip
==
null
?
null
:
wip
?
"yes"
:
"no"
)));
}
}
}
}
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