Enhance service

This commit is contained in:
Manuel Bouza
2019-02-07 18:26:15 +01:00
parent 7ad7cab5c0
commit cef97a5829
15 changed files with 210 additions and 112 deletions

View File

@@ -1,3 +1,19 @@
export const remoteServices = {
'github-pr': {
name: 'github',
urlPattern: 'https://github.com/:org/:repo/pull/:id',
id: (document, service, { org, repo, id }) => [org, repo, service.key, id].join('-'),
description: 'This is always the same text',
projectId: (document) => {
const match = document.querySelector(".gh-header-title").textContent.trim().match(/\[(\d+)\]/)
return match && match[1]
}
},
'jira-cloud': {
name: 'jira',
urlPattern: 'https://cloud.jira.com/browse?project=:project&issue=:id'
}
}
export const projects = [
{
id: 944868981,