bitbucketdc-cli 1.0.17 → 1.0.18
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/dist/index.js +2 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -891,9 +891,7 @@ Examples:
|
|
|
891
891
|
bitbucketdc pr update --project PROJ --repo my-repo --id 42 --title "New" --description "Both"`
|
|
892
892
|
).action(async (opts) => {
|
|
893
893
|
if (!opts.title && !opts.description) {
|
|
894
|
-
|
|
895
|
-
`);
|
|
896
|
-
process.exit(1);
|
|
894
|
+
throw new Error("At least one of --title or --description is required");
|
|
897
895
|
}
|
|
898
896
|
const client = getClient();
|
|
899
897
|
const result = await client.pullRequests.update({
|
|
@@ -1057,11 +1055,7 @@ Examples:
|
|
|
1057
1055
|
const token = process.env.BITBUCKET_TOKEN;
|
|
1058
1056
|
if (!baseUrl || !token) {
|
|
1059
1057
|
const missing = [...!baseUrl ? ["BITBUCKET_URL"] : [], ...!token ? ["BITBUCKET_TOKEN"] : []];
|
|
1060
|
-
|
|
1061
|
-
`${JSON.stringify({ error: `Missing required environment variables: ${missing.join(", ")}` })}
|
|
1062
|
-
`
|
|
1063
|
-
);
|
|
1064
|
-
process.exit(1);
|
|
1058
|
+
throw new Error(`Missing required environment variables: ${missing.join(", ")}`);
|
|
1065
1059
|
}
|
|
1066
1060
|
const cloneUrl = `${baseUrl}/scm/${opts.project}/${opts.repo}.git`;
|
|
1067
1061
|
const args = ["-c", `http.extraHeader=Authorization: Bearer ${token}`, "clone", cloneUrl];
|