Add projectId to remote services
This commit is contained in:
@@ -36,6 +36,11 @@ export default {
|
|||||||
id: (document, service, { org, repo, id }) => [service.key, org, repo, id].join("."),
|
id: (document, service, { org, repo, id }) => [service.key, org, repo, id].join("."),
|
||||||
description: (document, service, { org, repo, id }) =>
|
description: (document, service, { org, repo, id }) =>
|
||||||
document.querySelector(".js-issue-title")?.textContent?.trim(),
|
document.querySelector(".js-issue-title")?.textContent?.trim(),
|
||||||
|
projectId: document =>
|
||||||
|
document
|
||||||
|
.querySelector(".js-issue-title")
|
||||||
|
?.textContent?.trim()
|
||||||
|
?.match(projectRegex)?.[1],
|
||||||
},
|
},
|
||||||
|
|
||||||
jira: {
|
jira: {
|
||||||
@@ -82,12 +87,22 @@ export default {
|
|||||||
urlPatterns: ["https\\://trello.com/c/:id/:title"],
|
urlPatterns: ["https\\://trello.com/c/:id/:title"],
|
||||||
description: (document, service, { title }) =>
|
description: (document, service, { title }) =>
|
||||||
document.querySelector(".js-title-helper")?.textContent?.trim() || title,
|
document.querySelector(".js-title-helper")?.textContent?.trim() || title,
|
||||||
|
projectId: document =>
|
||||||
|
document
|
||||||
|
.querySelector(".js-title-helper")
|
||||||
|
?.textContent?.trim()
|
||||||
|
?.match(projectRegex)?.[1],
|
||||||
},
|
},
|
||||||
|
|
||||||
youtrack: {
|
youtrack: {
|
||||||
name: "youtrack",
|
name: "youtrack",
|
||||||
urlPatterns: ["https\\://:org.myjetbrains.com/youtrack/issue/:id"],
|
urlPatterns: ["https\\://:org.myjetbrains.com/youtrack/issue/:id"],
|
||||||
description: document => document.querySelector("yt-issue-body h1")?.textContent?.trim(),
|
description: document => document.querySelector("yt-issue-body h1")?.textContent?.trim(),
|
||||||
|
projectId: document =>
|
||||||
|
document
|
||||||
|
.querySelector("yt-issue-body h1")
|
||||||
|
?.textContent?.trim()
|
||||||
|
?.match(projectRegex)?.[1],
|
||||||
},
|
},
|
||||||
|
|
||||||
wrike: {
|
wrike: {
|
||||||
@@ -116,5 +131,10 @@ export default {
|
|||||||
document
|
document
|
||||||
.querySelector(".taskItem.selected .taskItem-titleWrapper-title")
|
.querySelector(".taskItem.selected .taskItem-titleWrapper-title")
|
||||||
?.textContent?.trim(),
|
?.textContent?.trim(),
|
||||||
|
projectId: document =>
|
||||||
|
document
|
||||||
|
.querySelector(".taskItem.selected .taskItem-titleWrapper-title")
|
||||||
|
?.textContent?.trim()
|
||||||
|
?.match(projectRegex)?.[1],
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user