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
91807f25
Commit
91807f25
authored
Jun 13, 2024
by
Jeremie Bresson
Browse files
Merge remote-tracking branch 'origin/main' into 6.x
parents
6e0ff512
e8a261a5
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/gitlab4j/api/ProjectApi.java
View file @
91807f25
...
@@ -1355,6 +1355,8 @@ public class ProjectApi extends AbstractApi implements Constants {
...
@@ -1355,6 +1355,8 @@ public class ProjectApi extends AbstractApi implements Constants {
formData
.
withParam
(
"issue_branch_template"
,
project
.
getIssueBranchTemplate
());
formData
.
withParam
(
"issue_branch_template"
,
project
.
getIssueBranchTemplate
());
formData
.
withParam
(
"merge_commit_template"
,
project
.
getMergeCommitTemplate
());
formData
.
withParam
(
"merge_commit_template"
,
project
.
getMergeCommitTemplate
());
formData
.
withParam
(
"squash_commit_template"
,
project
.
getSquashCommitTemplate
());
formData
.
withParam
(
"squash_commit_template"
,
project
.
getSquashCommitTemplate
());
formData
.
withParam
(
"merge_requests_template"
,
project
.
getMergeRequestsTemplate
());
formData
.
withParam
(
"issues_template"
,
project
.
getIssuesTemplate
());
if
(
project
.
getTagList
()
!=
null
&&
!
project
.
getTagList
().
isEmpty
())
{
if
(
project
.
getTagList
()
!=
null
&&
!
project
.
getTagList
().
isEmpty
())
{
formData
.
withParam
(
"tag_list"
,
String
.
join
(
","
,
project
.
getTagList
()));
formData
.
withParam
(
"tag_list"
,
String
.
join
(
","
,
project
.
getTagList
()));
...
@@ -2254,7 +2256,7 @@ public class ProjectApi extends AbstractApi implements Constants {
...
@@ -2254,7 +2256,7 @@ public class ProjectApi extends AbstractApi implements Constants {
boolean
doIssuesEvents
,
boolean
doMergeRequestsEvents
)
throws
GitLabApiException
{
boolean
doIssuesEvents
,
boolean
doMergeRequestsEvents
)
throws
GitLabApiException
{
return
addHook
(
projectIdOrPath
,
url
,
doPushEvents
,
doIssuesEvents
,
doMergeRequestsEvents
,
null
);
return
addHook
(
projectIdOrPath
,
url
,
doPushEvents
,
doIssuesEvents
,
doMergeRequestsEvents
,
null
);
}
}
/**
/**
* Adds a hook to project.
* Adds a hook to project.
* Convenience method for {@link #addHook(Object, String, ProjectHook, Boolean, String)}
* Convenience method for {@link #addHook(Object, String, ProjectHook, Boolean, String)}
...
@@ -4044,7 +4046,7 @@ public class ProjectApi extends AbstractApi implements Constants {
...
@@ -4044,7 +4046,7 @@ public class ProjectApi extends AbstractApi implements Constants {
public
ProjectAccessToken
rotateProjectAccessToken
(
Object
projectIdOrPath
,
Long
tokenId
)
throws
GitLabApiException
{
public
ProjectAccessToken
rotateProjectAccessToken
(
Object
projectIdOrPath
,
Long
tokenId
)
throws
GitLabApiException
{
return
rotateProjectAccessToken
(
projectIdOrPath
,
tokenId
,
null
);
return
rotateProjectAccessToken
(
projectIdOrPath
,
tokenId
,
null
);
}
}
/**
/**
* Rotates the given project access token.
* Rotates the given project access token.
* The token is revoked and a new one which will expire in one week is created to replace it.
* The token is revoked and a new one which will expire in one week is created to replace it.
...
...
src/main/java/org/gitlab4j/api/models/Project.java
View file @
91807f25
...
@@ -119,6 +119,9 @@ public class Project implements Serializable {
...
@@ -119,6 +119,9 @@ public class Project implements Serializable {
private
String
mergeCommitTemplate
;
private
String
mergeCommitTemplate
;
private
String
squashCommitTemplate
;
private
String
squashCommitTemplate
;
private
String
issueBranchTemplate
;
private
String
issueBranchTemplate
;
private
String
mergeRequestsTemplate
;
private
String
issuesTemplate
;
@JsonProperty
(
"_links"
)
@JsonProperty
(
"_links"
)
private
Map
<
String
,
String
>
links
;
private
Map
<
String
,
String
>
links
;
...
@@ -950,6 +953,22 @@ public class Project implements Serializable {
...
@@ -950,6 +953,22 @@ public class Project implements Serializable {
this
.
issueBranchTemplate
=
issueBranchTemplate
;
this
.
issueBranchTemplate
=
issueBranchTemplate
;
}
}
public
String
getMergeRequestsTemplate
()
{
return
mergeRequestsTemplate
;
}
public
void
setMergeRequestsTemplate
(
String
mergeRequestsTemplate
)
{
this
.
mergeRequestsTemplate
=
mergeRequestsTemplate
;
}
public
String
getIssuesTemplate
()
{
return
issuesTemplate
;
}
public
void
setIssuesTemplate
(
String
issuesTemplate
)
{
this
.
issuesTemplate
=
issuesTemplate
;
}
public
Map
<
String
,
String
>
getLinks
()
{
public
Map
<
String
,
String
>
getLinks
()
{
return
links
;
return
links
;
}
}
...
...
src/test/resources/org/gitlab4j/api/project.json
View file @
91807f25
...
@@ -96,6 +96,8 @@
...
@@ -96,6 +96,8 @@
"merge_commit_template"
:
"Merge branch '%{source_branch}' into '%{target_branch}'"
,
"merge_commit_template"
:
"Merge branch '%{source_branch}' into '%{target_branch}'"
,
"squash_commit_template"
:
"Commit %{title}"
,
"squash_commit_template"
:
"Commit %{title}"
,
"issue_branch_template"
:
"issue-%{id}"
,
"issue_branch_template"
:
"issue-%{id}"
,
"merge_requests_template"
:
""
,
"issues_template"
:
""
,
"autoclose_referenced_issues"
:
true
,
"autoclose_referenced_issues"
:
true
,
"permissions"
:
{
"permissions"
:
{
"project_access"
:
{
"project_access"
:
{
...
@@ -125,4 +127,4 @@
...
@@ -125,4 +127,4 @@
"packages_size"
:
0
"packages_size"
:
0
},
},
"custom_attributes"
:
[
]
"custom_attributes"
:
[
]
}
}
\ 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