diff --git a/src/common/adapters/github.js b/src/common/adapters/github.js index 35e26d04..d6a0f1cd 100644 --- a/src/common/adapters/github.js +++ b/src/common/adapters/github.js @@ -1,8 +1,18 @@ +/** + * GitHub and GitHub Enterprise adapter + * + * The adapter uses the DOM to extract ticket information from issues. + */ + import { $all, $has, $text, $value } from './helpers'; -// Element classes on GitHub have slightly changed over time. -// To maintain support for some older GitHub Enterprise instances, -// the adapter will attempt different versions of selectors. +/** + * DOM selectors + * + * Element classes on GitHub have slightly changed over time. + * To maintain support for some older GitHub Enterprise instances, the adapter + * will attempt different versions of selectors. + */ export const selectors = { default: { issuesPage: '.js-check-all-container .js-issue-row.selected', diff --git a/src/common/adapters/gitlab.js b/src/common/adapters/gitlab.js index fbff13fd..f1ae9fab 100644 --- a/src/common/adapters/gitlab.js +++ b/src/common/adapters/gitlab.js @@ -1,3 +1,9 @@ +/** + * Gitlab adapter + * + * The adapter uses the DOM to extract information about tickets. + */ + import { $has, $text } from './helpers'; async function scan(loc, doc) { diff --git a/src/common/adapters/jira.js b/src/common/adapters/jira.js index 4a564ff1..966ad2a1 100644 --- a/src/common/adapters/jira.js +++ b/src/common/adapters/jira.js @@ -1,13 +1,16 @@ -// Jira adapter -// -// This adapter extracts the identifier of the selected issue from the page URL -// and uses the Jira API to retrieve the corresponding ticket information. -// -// https://developer.atlassian.com/server/jira/platform/rest-apis/ -// -// * Backlog and Active Sprints: https://.atlassian.net/secure/RapidBoard.jspa?…&selectedIssue= -// * Issues and filters: https://.atlassian.net/projects//issues/ -// * Issue view: https://.atlassian.net/browse/ +/** + * Jira adapter + * + * The adapter extracts the identifier of the selected issue from the page URL + * and uses the Jira API to retrieve the corresponding ticket information. + * + * https://developer.atlassian.com/server/jira/platform/rest-apis/ + * + * Supported page URLs: + * - Backlog and Active Sprints: https://.atlassian.net/secure/RapidBoard.jspa?…&selectedIssue= + * - Issues and filters: https://.atlassian.net/projects//issues/ + * - Issue view: https://.atlassian.net/browse/ + */ import { match } from 'micro-match'; diff --git a/src/common/adapters/jira.test.js b/src/common/adapters/jira.test.js index 759628db..eb5ded33 100644 --- a/src/common/adapters/jira.test.js +++ b/src/common/adapters/jira.test.js @@ -4,7 +4,7 @@ import client from '../client'; import loc from './__helpers__/location'; import scan from './jira'; -jest.mock('../client', () => jest.fn()); +jest.mock('../client'); const key = 'RC-654'; diff --git a/src/common/adapters/notion.test.js b/src/common/adapters/notion.test.js index 226e1920..912f167a 100644 --- a/src/common/adapters/notion.test.js +++ b/src/common/adapters/notion.test.js @@ -2,7 +2,7 @@ import client from '../client'; import loc from './__helpers__/location'; import scan from './notion'; -jest.mock('../client', () => jest.fn()); +jest.mock('../client'); describe('notion adapter', () => { const id = '5b1d7dd7-9107-4890-b2ec-83175b8eda83'; diff --git a/src/common/adapters/trello.js b/src/common/adapters/trello.js index 3b06b11a..49acc02f 100644 --- a/src/common/adapters/trello.js +++ b/src/common/adapters/trello.js @@ -1,12 +1,14 @@ -// Trello adapter -// -// This adapter extracts the identifier of the selected card (short link) from -// the page URL and uses the Trello API to retrieve the corresponding card -// information. -// -// https://developers.trello.com/v1.0/reference#introduction -// -// Card view: https://trello.com/c//1-ticket-title +/** + * Trello adapter + * + * The adapter extracts the identifier of the selected card (short link) from + * the page URL and uses the Trello API to retrieve the corresponding card + * information. + * + * https://developers.trello.com/v1.0/reference#introduction + * + * Card view: https://trello.com/c//1-ticket-title + */ import { match } from 'micro-match'; diff --git a/src/common/adapters/trello.test.js b/src/common/adapters/trello.test.js index e4893971..47f86419 100644 --- a/src/common/adapters/trello.test.js +++ b/src/common/adapters/trello.test.js @@ -2,7 +2,7 @@ import client from '../client'; import loc from './__helpers__/location'; import scan from './trello'; -jest.mock('../client', () => jest.fn()); +jest.mock('../client'); const key = 'haKn65Sy';