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>
This commit is contained in:
Antoine du Hamel 2021-03-16 17:00:20 +01:00 committed by Danielle Adams
parent 89f3aa92b4
commit 72af5d9895
No known key found for this signature in database
GPG Key ID: D3A89613643B6201

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