Skip to content

Commit

Permalink
Merge branch 'develop' into fix/e2ee-rooms-creation
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] authored Jul 24, 2024
2 parents 64fecb5 + a0578b1 commit 8be7a6f
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
24 changes: 22 additions & 2 deletions apps/meteor/reporters/jira.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ class JIRAReporter implements Reporter {
console.log(`Sending test result to JIRA: ${JSON.stringify(payload)}`);

// first search and check if there is an existing issue

// replace all ()[]- with nothing
const search = await fetch(
`${this.url}/rest/api/2/search?${new URLSearchParams({
jql: `project = FLAKY AND summary ~ '${payload.name}'`,
jql: `project = FLAKY AND summary ~ '${payload.name.replace(/[\(\)\[\]-]/g, '')}'`,
})}`,
{
method: 'GET',
Expand Down Expand Up @@ -104,6 +104,25 @@ class JIRAReporter implements Reporter {
if (existing) {
const { location } = test;

if (this.pr === 0) {
await fetch(`${this.url}/rest/api/2/issue/${existing.key}`, {
method: 'PUT',
body: JSON.stringify({
update: {
labels: [
{
add: 'flaky_Develop',
},
],
},
}),
headers: {
'Content-Type': 'application/json',
'Authorization': `Basic ${this.apiKey}`,
},
});
}

await fetch(`${this.url}/rest/api/2/issue/${existing.key}/comment`, {
method: 'POST',
body: JSON.stringify({
Expand Down Expand Up @@ -146,6 +165,7 @@ ${this.run_url}
project: {
key: 'FLAKY',
},
...(this.pr === 0 && { labels: ['flaky_Develop'] }),
},
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export class BeforeSaveMarkdownParser {
message.md = parse(message.msg, config);
}

if (message.attachments?.[0]?.description !== undefined) {
if (message.attachments?.[0]?.description) {
message.attachments[0].descriptionMd = parse(message.attachments[0].description, config);
}
} catch (e) {
Expand Down

0 comments on commit 8be7a6f

Please sign in to comment.