Snippets
Created by
Kristian Walker
last modified
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 | /*
* This example script listener script should be conifgured to run on the Issue Created event and as the ScriptRunner Add-On User.
* "All right, title and interest in this code snippet shall remain the exclusive intellectual property of Adaptavist Group Ltd and its affiliates. Customers with a valid ScriptRunner
* license shall be granted a non-exclusive, non-transferable, freely revocable right to use this code snippet only within their own instance of Atlassian products. This licensing notice cannot be removed or
* amended and must be included in any circumstances where the code snippet is shared by You or a third party."
*/
import groovy.json.JsonOutput
def adfBody = [
"version": 1,
"type": "doc",
"content": [
[
"type": "paragraph",
"content": [
[
"type": "text",
"text": "Definition Of Done Checklist:",
],
]
],
[
"type": "rule"
],
[
"type": "paragraph",
"content": [
[
"type": "text",
"text": "Checklist:",
"marks": [
[
"type": "strong"
]
]
]
]
],
[
"type": "bulletList",
"content": [
[
"type": "listItem",
"content": [
[
"type": "paragraph",
"content": [
[
"type": "text",
"text": "All Requirements on Ticket Complete."
]
]
]
]
],
[
"type": "listItem",
"content": [
[
"type": "paragraph",
"content": [
[
"type": "text",
"text": "Pull Request reviewed by at least 2 developers."
]
]
]
]
],
[
"type": "listItem",
"content": [
[
"type": "paragraph",
"content": [
[
"type": "text",
"text": "Thorough spot checking done and video attached to PR covering relevant edge cases."
],
],
]
]
],
[
"type": "listItem",
"content": [
[
"type": "paragraph",
"content": [
[
"type": "text",
"text": "Unit tests all updated or added where necessary and pass."
]
]
]
]
],
[
"type": "listItem",
"content": [
[
"type": "paragraph",
"content": [
[
"type": "text",
"text": "Appropriate Monitoring or Error detection added."
]
]
]
]
],
[
"type": "listItem",
"content": [
[
"type": "paragraph",
"content": [
[
"type": "text",
"text": "Change fully regression tested for older code/config versions."
]
]
]
]
],
[
"type": "listItem",
"content": [
[
"type": "paragraph",
"content": [
[
"type": "text",
"text": "Release order considered."
]
]
]
]
],
[
"type": "listItem",
"content": [
[
"type": "paragraph",
"content": [
[
"type": "text",
"text": "Documentation updated."
]
]
]
]
]
]
],
[
"type": "rule"
]
]
]
def commentBody = [
body: [
type: "doc",
version: 1,
content: adfBody.content
]
]
def addComment = post("/rest/api/3/issue/${issue.key}/comment")
.header('Content-Type', 'application/json')
.body(JsonOutput.toJson(commentBody))
.asJson()
assert addComment.status == 201
|
Comments (0)
You can clone a snippet to your computer for local editing. Learn more.