@jira-deploy/core 1.0.17 → 1.0.19

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.
@@ -57,6 +57,7 @@ const DEFAULT_DEPLOY_CONFIG = {
57
57
  clusterList: 'customfield_cluster_list',
58
58
  grayReleaseNotes: 'customfield_grayrelease_notes',
59
59
  deployResult: 'customfield_deploy_result',
60
+ extraVars: 'customfield_extra_vars',
60
61
  },
61
62
  },
62
63
  issueTypes: {
package/jira-client.js CHANGED
@@ -79,7 +79,7 @@ export class JiraClient {
79
79
  // 查詢 issue 目前狀態
80
80
  async getIssue(issueKey) {
81
81
  const res = await this.http.get(`/issue/${issueKey}`, {
82
- params: { fields: 'status,summary,assignee,comment' },
82
+ params: { fields: 'status,summary,assignee,comment,issuetype' },
83
83
  });
84
84
  return res.data;
85
85
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jira-deploy/core",
3
- "version": "1.0.17",
3
+ "version": "1.0.19",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "repository": {
@@ -256,6 +256,12 @@ export function getGrayReleaseToolDefinitions() {
256
256
  type: 'string',
257
257
  description: 'Jenkins branch(選填,預設 master)',
258
258
  },
259
+ fortifyScan: {
260
+ type: 'boolean',
261
+ default: false,
262
+ description:
263
+ '(選填) 是否掃描 Fortify。預設 false;若為 true,會在 GrayRelease 專屬 extraVars 加入 {"fortifyScan":"True"}',
264
+ },
259
265
  dryRun: {
260
266
  type: 'boolean',
261
267
  description: '(選填) 預覽模式,不實際建立 Jira 單,回傳會送出的 payload',
@@ -512,6 +518,11 @@ export async function handleCreateGrayReleaseTicket(args, { jira, notifier }) {
512
518
  // gray release notes
513
519
  fields[GRAY_RELEASE_FIELD_IDS.grayReleaseNotes] = NOTES_TEMPLATES.grayRelease;
514
520
 
521
+ // fortify scan (GrayRelease 專屬 extraVars)
522
+ if (normalizedArgs.fortifyScan === true && GRAY_RELEASE_FIELD_IDS.extraVars) {
523
+ fields[GRAY_RELEASE_FIELD_IDS.extraVars] = JSON.stringify({ fortifyScan: 'True' });
524
+ }
525
+
515
526
  await assertNoOpenPRBeforeCreate({
516
527
  ticketType: 'grayrelease',
517
528
  systemCode: normalizedArgs.systemCode,
package/tools/index.js CHANGED
@@ -315,6 +315,7 @@ export async function executeTool(name, args, deps) {
315
315
  issueKey: args.issueKey,
316
316
  status: issue.fields.status.name,
317
317
  summary: issue.fields.summary,
318
+ type: issue.fields.issuetype?.name ?? '',
318
319
  });
319
320
  }
320
321