@docupace/pipeline 1.0.5-alpha.19 → 1.0.5-alpha.21
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/package.json +1 -1
- package/src/changeset/cli.js +3 -6
package/package.json
CHANGED
package/src/changeset/cli.js
CHANGED
|
@@ -168,13 +168,12 @@ program
|
|
|
168
168
|
|
|
169
169
|
try {
|
|
170
170
|
// Step 1: Get the current branch name
|
|
171
|
-
console.log('Before');
|
|
172
171
|
const { stdout: branchStdout } = await run(`git branch --show-current`);
|
|
173
172
|
const branchName = branchStdout.trim();
|
|
174
173
|
console.log(`Current branch: ${branchName}`);
|
|
175
174
|
|
|
176
|
-
// Step 2: Extract Jira ticket number (e.g., JIRA-1234)
|
|
177
|
-
const jiraTicketMatch = branchName.match(/([A-Z]
|
|
175
|
+
// Step 2: Extract Jira ticket number (e.g., matching JIRA-1234 pattern)
|
|
176
|
+
const jiraTicketMatch = branchName.match(/([A-Z]+-\d+)/);
|
|
178
177
|
if (!jiraTicketMatch) {
|
|
179
178
|
throw new Error('No Jira ticket found in the branch name.');
|
|
180
179
|
}
|
|
@@ -188,9 +187,7 @@ program
|
|
|
188
187
|
const jiraUrl = `${jiraBaseUrl}/rest/api/2/issue/${jiraTicketId}`;
|
|
189
188
|
const jiraResponse = await fetch(jiraUrl, {
|
|
190
189
|
headers: {
|
|
191
|
-
Authorization: `Basic ${Buffer.from(jiraFullApiKey).toString(
|
|
192
|
-
'base64',
|
|
193
|
-
)}`,
|
|
190
|
+
Authorization: `Basic ${Buffer.from(jiraFullApiKey).toString('base64')}`,
|
|
194
191
|
'Content-Type': 'application/json',
|
|
195
192
|
},
|
|
196
193
|
});
|