forked from github/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request github#28558 from github/repo-sync
Repo sync
- Loading branch information
Showing
13 changed files
with
30 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
There is a limit of ten tokens that are issued per user/application/scope combination. If an application creates more than 10 tokens for the same user and the same scopes, the oldest tokens with the same user/application/scope combination will be revoked. | ||
There is a limit of ten tokens that are issued per user/application/scope combination, with a maximum rate limit of ten tokens created per hour. If an application creates more than ten tokens for the same user and the same scopes, the oldest tokens with the same user/application/scope combination are revoked. However, hitting the hourly rate limit will not revoke your oldest token. After the hour has passed, you will be able to create a token again, and by doing so your oldest token will be revoked. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,7 @@ | ||
export function testOptions(rule, module, { strings, files, testConfig }) { | ||
const config = { | ||
default: false, | ||
[rule]: testConfig || true, | ||
} | ||
export const defaultOptions = { | ||
// frontMatter: null will be set soon | ||
} | ||
|
||
const options = { | ||
customRules: [module], | ||
config, | ||
} | ||
if (strings) options.strings = strings | ||
if (files) options.files = files | ||
return options | ||
export const defaultConfig = { | ||
default: false, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,22 @@ | ||
import markdownlint from 'markdownlint' | ||
|
||
import { testOptions } from './default-markdownlint-options.js' | ||
import { defaultOptions, defaultConfig } from './default-markdownlint-options.js' | ||
|
||
export async function runRule(module, { strings, files, testConfig }) { | ||
export async function runRule(module, { strings, files, ruleConfig }) { | ||
if ((!strings && !files) || (strings && files)) | ||
throw new Error('Must provide either Markdown strings or files to run a rule') | ||
|
||
const options = testOptions(module.names[0], module, { strings, files, testConfig }) | ||
const testConfig = { | ||
[module.names[0]]: ruleConfig || true, | ||
} | ||
|
||
const testOptions = { | ||
customRules: [module], | ||
config: { ...defaultConfig, ...testConfig }, | ||
} | ||
if (strings) testOptions.strings = strings | ||
if (files) testOptions.files = files | ||
|
||
const options = { ...defaultOptions, ...testOptions } | ||
return await markdownlint.promises.markdownlint(options) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 0 additions & 4 deletions
4
src/content-linter/tests/unit/image-alt-text-end-punctuation.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 0 additions & 4 deletions
4
src/content-linter/tests/unit/image-alt-text-exclude-start-words.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters