Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
Eclipse Project Code
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Eclipse Projects
Technology
Eclipse Dash
Eclipse Project Code
Commits
a3e899c8
Commit
a3e899c8
authored
2 years ago
by
Wayne Beaton
Browse files
Options
Downloads
Patches
Plain Diff
Bail out when we hit an exception.
parent
a738bda2
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/org/eclipse/dash/ip/project/code/InitialContributionReviewTaskFinder.java
+10
-6
10 additions, 6 deletions
.../ip/project/code/InitialContributionReviewTaskFinder.java
with
10 additions
and
6 deletions
src/main/java/org/eclipse/dash/ip/project/code/InitialContributionReviewTaskFinder.java
+
10
−
6
View file @
a3e899c8
...
...
@@ -120,8 +120,7 @@ public class InitialContributionReviewTaskFinder {
}
logger
.
info
(
"Review created {}"
,
existing
.
getWebUrl
());
}
catch
(
IOException
e1
)
{
// TODO Auto-generated catch block
e1
.
printStackTrace
();
throw
new
RuntimeException
(
e1
);
}
...
...
@@ -131,14 +130,16 @@ public class InitialContributionReviewTaskFinder {
try
{
var
linkExists
=
gitlab
.
getIssuesApi
().
getIssueLinksStream
(
InitialContributionProcess
.
getIPLabPath
(),
existing
.
getIid
())
.
filter
(
each
->
each
.
getIid
()
==
issue
.
getIid
())
.
filter
(
each
->
each
.
getIid
()
.
equals
(
issue
.
getIid
())
)
.
findAny
()
.
isPresent
();
if
(!
linkExists
)
{
gitlab
.
getIssuesApi
().
createIssueLink
(
InitialContributionProcess
.
get
EmoProject
Path
(),
existing
.
getIid
(),
InitialContributionProcess
.
get
IPLab
Path
(),
issue
.
getIid
());
gitlab
.
getIssuesApi
().
createIssueLink
(
InitialContributionProcess
.
get
IPLab
Path
(),
existing
.
getIid
(),
InitialContributionProcess
.
get
EmoProject
Path
(),
issue
.
getIid
());
}
}
catch
(
GitLabApiException
e
)
{
// NOTE that the GitLab user must have privileges on both repositories
// for the link creation to work.
throw
new
RuntimeException
(
e
);
}
}
...
...
@@ -152,7 +153,7 @@ public class InitialContributionReviewTaskFinder {
try
{
IssueFilter
filter
=
new
IssueFilter
().
withLabels
(
Arrays
.
asList
(
new
String
[]{
"Project Content"
,
"Initial Contribution"
}));
return
gitlab
.
getIssuesApi
()
.
getIssuesStream
(
InitialContributionProcess
.
get
EmoProject
Path
(),
filter
)
.
getIssuesStream
(
InitialContributionProcess
.
get
IPLab
Path
(),
filter
)
.
filter
(
issue
->
issue
.
getTitle
().
startsWith
(
match
))
.
findAny
().
orElse
(
null
);
}
catch
(
GitLabApiException
e
)
{
...
...
@@ -179,6 +180,9 @@ public class InitialContributionReviewTaskFinder {
.
replace
(
"{name}"
,
repo
.
getFullName
())
.
replace
(
"{sha}"
,
sha
);
var
license
=
repo
.
getLicense
();
var
licenseName
=
license
!=
null
?
license
.
getName
()
:
"N/A"
;
var
builder
=
new
StringBuilder
();
return
builder
.
append
(
"Project: "
).
append
(
getProjectLink
(
project
)).
append
(
"\n\n"
)
...
...
@@ -187,7 +191,7 @@ public class InitialContributionReviewTaskFinder {
.
append
(
"[Repository]({url})\n\n"
.
replace
(
"{url}"
,
repo
.
getHtmlUrl
().
toString
()))
.
append
(
" - Default branch: {branch}\n"
.
replace
(
"{branch}"
,
repo
.
getDefaultBranch
()))
.
append
(
" - Commit: {sha}\n"
.
replace
(
"{sha}"
,
sha
))
.
append
(
" - License: {license}\n"
.
replace
(
"{license}"
,
repo
.
getLicense
().
get
Name
()
))
.
append
(
" - License: {license}\n"
.
replace
(
"{license}"
,
license
Name
))
.
append
(
" - [Browse]({url})\n"
.
replace
(
"{url}"
,
browseUrl
))
.
append
(
" - [Source]({url})\n"
.
replace
(
"{url}"
,
archiveUrl
))
.
toString
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment