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
76ded458
Unverified
Commit
76ded458
authored
Mar 08, 2020
by
rnemykin
Committed by
GitHub
Mar 07, 2020
Browse files
Add author_id param in MergeRequestFilter (#525)
parent
4b2f3a4e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/gitlab4j/api/models/MergeRequestFilter.java
View file @
76ded458
package
org.gitlab4j.api.models
;
import
static
org
.
gitlab4j
.
api
.
Constants
.
MergeRequestScope
.
ALL
;
import
static
org
.
gitlab4j
.
api
.
Constants
.
MergeRequestScope
.
ASSIGNED_TO_ME
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -31,6 +34,10 @@ public class MergeRequestFilter {
private
Date
updatedAfter
;
private
Date
updatedBefore
;
private
MergeRequestScope
scope
;
/**
* Filter MR by created by the given user id. Combine with scope=all or scope=assigned_to_me
*/
private
Integer
authorId
;
private
Integer
assigneeId
;
private
String
myReactionEmoji
;
...
...
@@ -322,25 +329,30 @@ public class MergeRequestFilter {
@JsonIgnore
public
GitLabApiForm
getQueryParams
()
{
return
(
new
GitLabApiForm
()
.
withParam
(
"iids"
,
iids
)
.
withParam
(
"state"
,
state
)
.
withParam
(
"order_by"
,
orderBy
)
.
withParam
(
"sort"
,
sort
)
.
withParam
(
"milestone"
,
milestone
)
.
withParam
(
"view"
,
(
simpleView
!=
null
&&
simpleView
?
"simple"
:
null
))
.
withParam
(
"labels"
,
(
labels
!=
null
?
String
.
join
(
","
,
labels
)
:
null
))
.
withParam
(
"created_after"
,
createdAfter
)
.
withParam
(
"created_before"
,
createdBefore
)
.
withParam
(
"updated_after"
,
updatedAfter
)
.
withParam
(
"updated_before"
,
updatedBefore
)
.
withParam
(
"scope"
,
scope
)
.
withParam
(
"assignee_id"
,
assigneeId
)
.
withParam
(
"my_reaction_emoji"
,
myReactionEmoji
)
.
withParam
(
"source_branch"
,
sourceBranch
)
.
withParam
(
"target_branch"
,
targetBranch
)
.
withParam
(
"search"
,
search
)
.
withParam
(
"in"
,
in
)
.
withParam
(
"wip"
,
(
wip
==
null
?
null
:
wip
?
"yes"
:
"no"
)));
GitLabApiForm
params
=
new
GitLabApiForm
()
.
withParam
(
"iids"
,
iids
)
.
withParam
(
"state"
,
state
)
.
withParam
(
"order_by"
,
orderBy
)
.
withParam
(
"sort"
,
sort
)
.
withParam
(
"milestone"
,
milestone
)
.
withParam
(
"view"
,
(
simpleView
!=
null
&&
simpleView
?
"simple"
:
null
))
.
withParam
(
"labels"
,
(
labels
!=
null
?
String
.
join
(
","
,
labels
)
:
null
))
.
withParam
(
"created_after"
,
createdAfter
)
.
withParam
(
"created_before"
,
createdBefore
)
.
withParam
(
"updated_after"
,
updatedAfter
)
.
withParam
(
"updated_before"
,
updatedBefore
)
.
withParam
(
"scope"
,
scope
)
.
withParam
(
"assignee_id"
,
assigneeId
)
.
withParam
(
"my_reaction_emoji"
,
myReactionEmoji
)
.
withParam
(
"source_branch"
,
sourceBranch
)
.
withParam
(
"target_branch"
,
targetBranch
)
.
withParam
(
"search"
,
search
)
.
withParam
(
"in"
,
in
)
.
withParam
(
"wip"
,
(
wip
==
null
?
null
:
wip
?
"yes"
:
"no"
));
if
(
authorId
!=
null
&&
(
scope
==
ALL
||
scope
==
ASSIGNED_TO_ME
))
{
params
.
withParam
(
"author_id"
,
authorId
);
}
return
params
;
}
}
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