Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
holmes
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
QA
holmes
Commits
c0647aac
Commit
c0647aac
authored
Apr 23, 2021
by
黎博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test
parent
99fbad3c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
JiraController.java
...ain/java/cn/qg/holmes/controller/jira/JiraController.java
+15
-0
No files found.
src/main/java/cn/qg/holmes/controller/jira/JiraController.java
View file @
c0647aac
...
@@ -5,9 +5,12 @@ import cn.qg.holmes.entity.jira.SendScheduleVo;
...
@@ -5,9 +5,12 @@ import cn.qg.holmes.entity.jira.SendScheduleVo;
import
cn.qg.holmes.service.jira.JiraIssueService
;
import
cn.qg.holmes.service.jira.JiraIssueService
;
import
cn.qg.holmes.utils.DingdingUtils
;
import
cn.qg.holmes.utils.DingdingUtils
;
import
com.atlassian.jira.rest.client.api.domain.Issue
;
import
com.atlassian.jira.rest.client.api.domain.Issue
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
@Slf4j
@CrossOrigin
@CrossOrigin
@RestController
@RestController
@RequestMapping
(
"/jira"
)
@RequestMapping
(
"/jira"
)
...
@@ -16,6 +19,9 @@ public class JiraController {
...
@@ -16,6 +19,9 @@ public class JiraController {
@Autowired
@Autowired
JiraIssueService
jiraIssueService
;
JiraIssueService
jiraIssueService
;
@Value
(
"${task.debug}"
)
private
String
taskDebug
;
@GetMapping
(
"/report/project"
)
@GetMapping
(
"/report/project"
)
public
void
sendReportToDingdingGroup
(
String
project
,
String
webhook
)
throws
Exception
{
public
void
sendReportToDingdingGroup
(
String
project
,
String
webhook
)
throws
Exception
{
Iterable
<
Issue
>
issues
=
jiraIssueService
.
getUnsolvedIssueListByProject
(
project
);
Iterable
<
Issue
>
issues
=
jiraIssueService
.
getUnsolvedIssueListByProject
(
project
);
...
@@ -35,4 +41,13 @@ public class JiraController {
...
@@ -35,4 +41,13 @@ public class JiraController {
String
markdownMsg
=
DingdingUtils
.
buildTestScheduleMarkdownMsg
(
issues
,
sendScheduleVo
.
getProgress
(),
sendScheduleVo
.
getRisk
());
String
markdownMsg
=
DingdingUtils
.
buildTestScheduleMarkdownMsg
(
issues
,
sendScheduleVo
.
getProgress
(),
sendScheduleVo
.
getRisk
());
return
JsonResult
.
buildSuccessResult
(
DingdingUtils
.
sendToDingding
(
markdownMsg
,
sendScheduleVo
.
getWebhook
()));
return
JsonResult
.
buildSuccessResult
(
DingdingUtils
.
sendToDingding
(
markdownMsg
,
sendScheduleVo
.
getWebhook
()));
}
}
@GetMapping
(
"/test"
)
public
void
test
()
{
if
(
taskDebug
.
equals
(
"true"
))
{
log
.
info
(
"true"
);
}
else
{
log
.
info
(
"false"
);
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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