@cmflow/cli 3.1.2 → 3.1.4

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.
Binary file
package/README.md CHANGED
@@ -310,7 +310,7 @@ The `jira-releases` command lists and (optionally) updates Jira versions related
310
310
  - `DIRECTUS_FLOW_ID`
311
311
  - `DIRECTUS_ACCESS_TOKEN`
312
312
 
313
- If all 3 Directus variables are present, `CmFlow` considers `CAN_TRIGGER_WORKFLOW=true` and will attempt to run the workflow after updating releases.
313
+ If all three Directus variables are present, `CmFlow` considers `CAN_TRIGGER_WORKFLOW=true` and will attempt to run the workflow after updating releases.
314
314
 
315
315
  ### Usage
316
316
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cmflow/cli",
3
- "version": "3.1.2",
3
+ "version": "3.1.4",
4
4
  "description": "An awesome Git Flow",
5
5
  "author": "camfou",
6
6
  "license": "MIT",
@@ -14,23 +14,26 @@ export async function getJiraReleases(projectId) {
14
14
 
15
15
  export async function updateJiraRelease(release) {
16
16
  const endpoint = `/rest/api/3/version/${release.id}`;
17
-
18
- await jiraRequest(endpoint, {
19
- method: "put",
20
- headers: {
21
- "Content-Type": "application/json",
22
- Accept: "application/json"
23
- },
24
- body: {
25
- id: release.id,
26
- description: release.description,
27
- name: release.name,
28
- archived: release.archived,
29
- released: release.released,
30
- projectId: release.projectId,
31
- releaseDate: release.releaseDate
32
- }
33
- });
17
+ try {
18
+ await jiraRequest(endpoint, {
19
+ method: "put",
20
+ headers: {
21
+ "Content-Type": "application/json",
22
+ Accept: "application/json"
23
+ },
24
+ body: {
25
+ id: release.id,
26
+ description: release.description,
27
+ name: release.name,
28
+ archived: release.archived,
29
+ released: release.released,
30
+ projectId: release.projectId,
31
+ releaseDate: release.releaseDate
32
+ }
33
+ });
34
+ } catch (er) {
35
+ console.log(`Error while updating jira release ${release.id}`, er);
36
+ }
34
37
  }
35
38
 
36
39
  export async function getJiraVersionRelatedIssues(projectId, tagVersion) {
@@ -32,8 +32,9 @@ export function verifyConditions(pluginConfig, context) {
32
32
  } else {
33
33
  git.fetch().sync();
34
34
  }
35
+
36
+ git.checkout(branch.name).sync();
35
37
  }
36
38
 
37
- git.checkout(branch.name).sync();
38
39
  git.branch(`--set-upstream-to=${ORIGIN}/${branch.name}`, branch.name).sync();
39
40
  }