Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion dist/index.js

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

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion dist/jira.js

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

2 changes: 1 addition & 1 deletion dist/jira.js.map

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

8 changes: 7 additions & 1 deletion src/jira.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,13 @@
);
}

return products.includes(this.issueDetails.product);
if (this.issueDetails.fixVersions === undefined) {
return false;
}

Check warning on line 91 in src/jira.ts

View check run for this annotation

Codecov / codecov/patch

src/jira.ts#L90-L91

Added lines #L90 - L91 were not covered by tests

return this.issueDetails.fixVersions.some(version =>
products.includes(version)
);
}

isSeveritySet(): boolean {
Expand Down
7 changes: 6 additions & 1 deletion test/unit/jira.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ describe('test Jira API', () => {

test<TestContext>('getUrl()', context => {
context.jira.issueDetails = {
type: 'Story',
component: 'systemd',
fixVersions: [],
id: '123456789',
Expand All @@ -89,6 +90,7 @@ describe('test Jira API', () => {

test<TestContext>('getMarkdownUrl()', context => {
context.jira.issueDetails = {
type: 'Story',
component: 'systemd',
fixVersions: [],
id: '123456789',
Expand All @@ -105,8 +107,9 @@ describe('test Jira API', () => {

test<TestContext>('isMatchingProduct()', context => {
const issue: IssueDetails = {
type: 'Story',
component: 'systemd',
fixVersions: [],
fixVersions: ['Red Hat Enterprise Linux 9'],
id: '123456789',
product: 'Red Hat Enterprise Linux 9',
summary: 'RHEL 9 bug',
Expand All @@ -123,6 +126,7 @@ describe('test Jira API', () => {

test<TestContext>('isMatchingComponent()', context => {
const issue: IssueDetails = {
type: 'Story',
component: 'systemd',
fixVersions: [],
id: '123456789',
Expand All @@ -147,6 +151,7 @@ describe('test Jira API', () => {
{ name: 'release', status: '+' },
];
let issue: IssueDetails = {
type: 'Story',
component: 'systemd',
flags: flags,
id: '123456789',
Expand Down
Loading