зеркало из https://github.com/github/docs.git
Use the 'label' to update definitions (#36808)
This commit is contained in:
Родитель
8dcea22cd7
Коммит
1270c7dbe9
|
@ -175,11 +175,11 @@ You can always rely on [GitHub integrations][integrations].
|
|||
|
||||
[status API]: /rest/commits/statuses
|
||||
[ngrok]: https://ngrok.com/
|
||||
[using ngrok]: /webhooks/configuring/#using-ngrok
|
||||
[using ngrok]: /webhooks-and-events/webhooks/configuring-your-server-to-receive-payloads#using-ngrok
|
||||
[platform samples]: https://github.com/github/platform-samples/tree/master/api/ruby/building-a-ci-server
|
||||
[Sinatra]: http://www.sinatrarb.com/
|
||||
[octokit.rb]: https://github.com/octokit/octokit.rb
|
||||
[access token]: /articles/creating-an-access-token-for-command-line-use
|
||||
[access token]: /authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token
|
||||
[travis api]: https://api.travis-ci.com/docs/
|
||||
[janky]: https://github.com/github/janky
|
||||
[integrations]: https://github.com/integrations
|
||||
|
|
|
@ -169,14 +169,14 @@ async function updateFile(file, context, opts) {
|
|||
if (content.includes(asMarkdown)) {
|
||||
if (opts.fixHref) {
|
||||
let newHref = node.url
|
||||
const { identifier } = node
|
||||
const { label } = node
|
||||
const betterHref = getNewHref(newHref, context, opts, file)
|
||||
// getNewHref() might return a deliberate `undefined` if the
|
||||
// new href value could not be computed for some reason.
|
||||
if (betterHref !== undefined) {
|
||||
newHref = betterHref
|
||||
}
|
||||
const newAsMarkdown = `[${identifier}]: ${newHref}`
|
||||
const newAsMarkdown = `[${label}]: ${newHref}`
|
||||
if (asMarkdown !== newAsMarkdown) {
|
||||
// Something can be improved!
|
||||
const column = node.position.start.column
|
||||
|
|
Загрузка…
Ссылка в новой задаче