tools: parse changelogs only in the default branch

The `lint-md` job on GitHub Actions parses the changelogs to determine
if the version numbers referenced in the YAML comments in the docs match
actual releases of Node.js.
Changelogs are sometimes not backported to release branches; this commit
disables changelog parsing on branches other than the default one.

Refs: https://github.com/nodejs/node/pull/37767

PR-URL: https://github.com/nodejs/node/pull/37768
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Danielle Adams <adamzdanielle@gmail.com>
Reviewed-By: Ruy Adorno <ruyadorno@github.com>
pull/37768/head
Antoine du Hamel 2021-03-16 17:00:20 +01:00
parent 3bba40abc6
commit 901ef1bcfc
1 changed files with 1 additions and 0 deletions

View File

@ -51,6 +51,7 @@ jobs:
- name: Environment Information
run: npx envinfo
- name: Get release version numbers
if: ${{ github.event.pull_request.base.ref == github.event.pull_request.base.repo.default_branch }}
id: get-released-versions
run: ./tools/node-lint-md-cli-rollup/src/list-released-versions-from-changelogs.mjs
- name: Lint docs