azdo-cli 0.2.0-develop.48 → 0.2.0-develop.52
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 +1 -0
- package/dist/index.js +6 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -4,6 +4,7 @@ A command-line interface for Azure DevOps.
|
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/azdo-cli)
|
|
6
6
|
[](LICENSE)
|
|
7
|
+
[](https://sonarcloud.io/summary/new_code?id=alkampfergit_azdo-cli)
|
|
7
8
|
|
|
8
9
|
## Installation
|
|
9
10
|
|
package/dist/index.js
CHANGED
|
@@ -97,8 +97,12 @@ async function getWorkItem(context, id, pat, extraFields) {
|
|
|
97
97
|
};
|
|
98
98
|
}
|
|
99
99
|
async function getWorkItemFieldValue(context, id, pat, fieldName) {
|
|
100
|
-
const url =
|
|
101
|
-
|
|
100
|
+
const url = new URL(
|
|
101
|
+
`https://dev.azure.com/${encodeURIComponent(context.org)}/${encodeURIComponent(context.project)}/_apis/wit/workitems/${id}`
|
|
102
|
+
);
|
|
103
|
+
url.searchParams.set("api-version", "7.1");
|
|
104
|
+
url.searchParams.set("fields", fieldName);
|
|
105
|
+
const response = await fetchWithErrors(url.toString(), { headers: authHeaders(pat) });
|
|
102
106
|
if (!response.ok) {
|
|
103
107
|
throw new Error(`HTTP_${response.status}`);
|
|
104
108
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "azdo-cli",
|
|
3
|
-
"version": "0.2.0-develop.
|
|
3
|
+
"version": "0.2.0-develop.52",
|
|
4
4
|
"description": "Azure DevOps CLI tool",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"lint": "eslint src/",
|
|
15
15
|
"typecheck": "tsc --noEmit",
|
|
16
16
|
"format": "prettier --check src/",
|
|
17
|
-
"test": "vitest run"
|
|
17
|
+
"test": "npm run build && vitest run"
|
|
18
18
|
},
|
|
19
19
|
"repository": {
|
|
20
20
|
"type": "git",
|