@ondrejbelza/semantic-release-jira 1.3.2 → 1.3.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.
@@ -1,2 +1,3 @@
1
1
  import { Version3Client } from "jira.js";
2
- export declare function CreateJiraClient(host: string, email: string, apiToken: string): Version3Client;
2
+ import { Signale } from "signale";
3
+ export declare function CreateJiraClient(logger: Signale, host: string, email: string, apiToken: string): Version3Client;
@@ -2,7 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CreateJiraClient = CreateJiraClient;
4
4
  const jira_js_1 = require("jira.js");
5
- function CreateJiraClient(host, email, apiToken) {
5
+ function CreateJiraClient(logger, host, email, apiToken) {
6
+ logger.info("creating new client v3 with host: " + host);
6
7
  const c = new jira_js_1.Version3Client({
7
8
  host: host,
8
9
  authentication: {
@@ -13,8 +13,9 @@ const jira_client_1 = require("./jira-client");
13
13
  async function verifyConditions(pluginConfig, context) {
14
14
  const { logger, env } = context;
15
15
  logger.log("Checking conditions for my custom plugin...");
16
- logger.log("jira host configure to:" + pluginConfig.jiraHost);
17
- if ((pluginConfig.jiraHost = "")) {
16
+ const host = pluginConfig.jiraHost;
17
+ logger.log("jira host configure to:" + host);
18
+ if (host == "") {
18
19
  throw new error_1.default("jira host configuration variable is missing.");
19
20
  }
20
21
  if (!env.JIRA_EMAIL) {
@@ -23,7 +24,7 @@ async function verifyConditions(pluginConfig, context) {
23
24
  if (!env.JIRA_TOKEN) {
24
25
  throw new error_1.default("JIRA_TOKEN environment variable is missing.");
25
26
  }
26
- const c = (0, jira_client_1.CreateJiraClient)(pluginConfig.jiraHost, env.JIRA_EMAIL, env.JIRA_TOKEN);
27
+ const c = (0, jira_client_1.CreateJiraClient)(logger, host, env.JIRA_EMAIL, env.JIRA_TOKEN);
27
28
  const p = await c.projects.getProject({
28
29
  projectIdOrKey: pluginConfig.project,
29
30
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ondrejbelza/semantic-release-jira",
3
- "version": "1.3.2",
3
+ "version": "1.3.4",
4
4
  "description": "semantic release jira releases plugin",
5
5
  "homepage": "https://github.com/mailstepcz/semantic-release-jira#readme",
6
6
  "bugs": {