Skip to content

Commit

Permalink
Merge branch 'v2' into zarate-output
Browse files Browse the repository at this point in the history
  • Loading branch information
maira-samtek committed Dec 17, 2024
2 parents 7e38175 + 330176a commit 3a40832
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 12 deletions.
13 changes: 10 additions & 3 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 15 additions & 8 deletions src/libs/jira-lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -485,16 +485,23 @@ export class Jira {
// Construct the webUrl for the new issue
newIssue['webUrl'] = `${this.jiraBaseURI}/browse/${newIssue.key}`
await this.removeCurrentUserAsWatcher(newIssue.key)
if (this.jiraWatchers) {
await Promise.all(
this.jiraWatchers.map((watcher: string) =>
this.addUserAsWatcher(
newIssue.key,
watcher,
this.jiraBaseURI.includes('atlassian') == false
if (this.jiraWatchers && this.jiraWatchers.length >= 1) {
try {
await Promise.all(
this.jiraWatchers.map(
(watcher: string) =>
watcher &&
this.addUserAsWatcher(
newIssue.key,
watcher,
this.jiraBaseURI.includes('atlassian') == false
)
)
)
)
} catch (error: unknown) {
console.log('Error: could not add watchers', this.jiraWatchers)
return newIssue
}
}
return newIssue
} catch (error: unknown) {
Expand Down
2 changes: 1 addition & 1 deletion src/macfc-security-hub-sync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ export class SecurityHubJiraSync {

// Validate the extracted region
if (!isAwsRegion(region)) {
console.error(`Invalid AWS region: ${region}`)
//console.error(`Invalid AWS region: ${region}`)
region = 'us-east-1' // Fallback to default region
}

Expand Down

0 comments on commit 3a40832

Please sign in to comment.