@automatify-au/cli 0.1.7 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -0
- package/dist/automatify.cjs +31 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -183,11 +183,39 @@ Upload without a Jira comment:
|
|
|
183
183
|
automatify testops allure upload ABC-123 ./allure-report.zip --no-comment
|
|
184
184
|
```
|
|
185
185
|
|
|
186
|
+
Normal output prints the Jira issue, attachment filename, attachment id, and attachment URL when Jira returns them.
|
|
187
|
+
|
|
186
188
|
Machine-readable output:
|
|
187
189
|
```bash
|
|
188
190
|
automatify testops allure upload ABC-123 ./allure-report.zip --dry-run --json
|
|
189
191
|
```
|
|
190
192
|
|
|
193
|
+
After a real upload, JSON output includes Jira attachment metadata when Jira returns it:
|
|
194
|
+
|
|
195
|
+
```json
|
|
196
|
+
{
|
|
197
|
+
"issueKey": "ABC-123",
|
|
198
|
+
"uploaded": true,
|
|
199
|
+
"commentAdded": true,
|
|
200
|
+
"dryRun": false,
|
|
201
|
+
"summary": {
|
|
202
|
+
"total": 128,
|
|
203
|
+
"passed": 120,
|
|
204
|
+
"failed": 5,
|
|
205
|
+
"broken": 1,
|
|
206
|
+
"skipped": 2,
|
|
207
|
+
"unknown": 0
|
|
208
|
+
},
|
|
209
|
+
"attachment": {
|
|
210
|
+
"filename": "allure-report.zip",
|
|
211
|
+
"id": "10001",
|
|
212
|
+
"self": "https://example.atlassian.net/rest/api/3/attachment/10001",
|
|
213
|
+
"content": "https://example.atlassian.net/rest/api/3/attachment/content/10001",
|
|
214
|
+
"size": 4096
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
```
|
|
218
|
+
|
|
191
219
|
### Optional gated maintenance commands
|
|
192
220
|
|
|
193
221
|
- `sync`
|
package/dist/automatify.cjs
CHANGED
|
@@ -12700,7 +12700,34 @@ function formatHumanSummary(summary) {
|
|
|
12700
12700
|
`Unknown: ${counts.unknown}`
|
|
12701
12701
|
];
|
|
12702
12702
|
}
|
|
12703
|
+
function formatHumanAttachment(attachment) {
|
|
12704
|
+
const lines = [`Attachment: ${attachment.filename}`];
|
|
12705
|
+
if (attachment.id) {
|
|
12706
|
+
lines.push(`Attachment ID: ${attachment.id}`);
|
|
12707
|
+
}
|
|
12708
|
+
if (attachment.content) {
|
|
12709
|
+
lines.push(`Attachment URL: ${attachment.content}`);
|
|
12710
|
+
} else if (attachment.self) {
|
|
12711
|
+
lines.push(`Attachment API URL: ${attachment.self}`);
|
|
12712
|
+
}
|
|
12713
|
+
return lines;
|
|
12714
|
+
}
|
|
12703
12715
|
function buildJsonOutput(params) {
|
|
12716
|
+
const attachment = {
|
|
12717
|
+
filename: params.attachment.filename
|
|
12718
|
+
};
|
|
12719
|
+
if (params.attachment.id) {
|
|
12720
|
+
attachment.id = params.attachment.id;
|
|
12721
|
+
}
|
|
12722
|
+
if (params.attachment.self) {
|
|
12723
|
+
attachment.self = params.attachment.self;
|
|
12724
|
+
}
|
|
12725
|
+
if (params.attachment.content) {
|
|
12726
|
+
attachment.content = params.attachment.content;
|
|
12727
|
+
}
|
|
12728
|
+
if (typeof params.attachment.size === "number") {
|
|
12729
|
+
attachment.size = params.attachment.size;
|
|
12730
|
+
}
|
|
12704
12731
|
return {
|
|
12705
12732
|
issueKey: params.issueKey,
|
|
12706
12733
|
uploaded: params.uploaded,
|
|
@@ -12714,9 +12741,7 @@ function buildJsonOutput(params) {
|
|
|
12714
12741
|
skipped: params.summary.counts.skipped,
|
|
12715
12742
|
unknown: params.summary.counts.unknown
|
|
12716
12743
|
},
|
|
12717
|
-
attachment
|
|
12718
|
-
filename: params.attachmentFilename
|
|
12719
|
-
}
|
|
12744
|
+
attachment
|
|
12720
12745
|
};
|
|
12721
12746
|
}
|
|
12722
12747
|
function createAllureHandler(deps = {}) {
|
|
@@ -12792,7 +12817,7 @@ function createAllureHandler(deps = {}) {
|
|
|
12792
12817
|
commentAdded: false,
|
|
12793
12818
|
dryRun: true,
|
|
12794
12819
|
summary,
|
|
12795
|
-
attachmentFilename
|
|
12820
|
+
attachment: { filename: attachmentFilename }
|
|
12796
12821
|
}))
|
|
12797
12822
|
};
|
|
12798
12823
|
}
|
|
@@ -12839,7 +12864,7 @@ function createAllureHandler(deps = {}) {
|
|
|
12839
12864
|
commentAdded,
|
|
12840
12865
|
dryRun: false,
|
|
12841
12866
|
summary,
|
|
12842
|
-
|
|
12867
|
+
attachment
|
|
12843
12868
|
}))
|
|
12844
12869
|
};
|
|
12845
12870
|
}
|
|
@@ -12850,6 +12875,7 @@ function createAllureHandler(deps = {}) {
|
|
|
12850
12875
|
...verbose ? [`Summary path: ${summary.summaryPath}`] : [],
|
|
12851
12876
|
"",
|
|
12852
12877
|
`Uploaded to Jira issue ${issueKey}.`,
|
|
12878
|
+
...formatHumanAttachment(attachment),
|
|
12853
12879
|
commentAdded ? "Comment added." : "Comment skipped."
|
|
12854
12880
|
]
|
|
12855
12881
|
};
|