Skip to content

Commit f5c2d50

Browse files
Copilotedvilme
andauthored
Require documentation updates for public API changes (#1852)
Public API changes could be merged without updating the API reference, leaving consumers with outdated documentation. ### Changes - Require `docs/README.md` updates when `src/api.ts`, `src/types.ts`, or `src/publicErrors.ts` changes. - Allow intentional exceptions through the `skip api docs` label. <!-- START COPILOT CODING AGENT SUFFIX --> - Fixes #1818 --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: edvilme <5952839+edvilme@users.noreply.github.com> Co-authored-by: Eduardo Villalpando Mello <eduardovil@microsoft.com>
1 parent d64605b commit f5c2d50

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

‎.github/workflows/pr-file-check.yml‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,14 @@ jobs:
6363
file-pattern: 'api/CHANGELOG.md'
6464
skip-label: 'skip api changelog'
6565
failure-message: 'The public API (${prereq-pattern}) was changed without a changelog entry in ${file-pattern} (the ${skip-label} label can be used to pass this check)'
66+
67+
- name: 'Public API changes require documentation updates'
68+
uses: brettcannon/check-for-changed-files@d85c64d17b3c1d0ac57c9cc46ea39399b0d6fa71 # v1.2.2
69+
with:
70+
prereq-pattern: |
71+
src/api.ts
72+
src/types.ts
73+
src/publicErrors.ts
74+
file-pattern: 'docs/README.md'
75+
skip-label: 'skip api docs'
76+
failure-message: 'The public API (${prereq-pattern}) was changed without updating ${file-pattern} (the ${skip-label} label can be used to pass this check)'

0 commit comments

Comments
 (0)