|
41 | 41 | - 'packages/widget-dashboard/**' |
42 | 42 | - 'packages/widget-primitives/**' |
43 | 43 | - 'packages/wp-build/**' |
| 44 | + - '!packages/*/**/*.md' |
44 | 45 | - 'packages/*/CHANGELOG.md' |
45 | 46 | - 'tools/validation/validate-changelogs.ts' |
46 | 47 | - '.github/workflows/check-package-changelogs.yml' |
47 | 48 | - '!packages/*/**/stories/**' |
48 | 49 | - '!packages/*/**/test/**' |
49 | 50 | - '!packages/*/**/__tests__/**' |
| 51 | + - '!packages/*/**/*.stories.*' |
| 52 | + - '!packages/*/**/*.mdx' |
| 53 | + - '!packages/*/**/storybook.d.ts' |
| 54 | + - '!packages/*/tsconfig.stories.json' |
| 55 | + - '!packages/*/tsconfig.test.json' |
| 56 | + - '!packages/*/tsconfig.bin.json' |
| 57 | + - '!packages/*/.stylelintrc*' |
| 58 | + - '!packages/*/.eslintrc*' |
| 59 | + - '!packages/*/.prettierrc*' |
| 60 | + - '!packages/*/.gitignore' |
50 | 61 |
|
51 | 62 | # Disable permissions for all available scopes by default. |
52 | 63 | # Any needed permissions should be configured at the job level. |
@@ -127,8 +138,23 @@ jobs: |
127 | 138 | # The workflow's `paths:` filter triggers on the union of all |
128 | 139 | # tracked packages, so this matrix entry may run on a PR that |
129 | 140 | # doesn't touch its package. Short-circuit if that's the case. |
| 141 | + # Files that don't warrant a CHANGELOG entry: |
| 142 | + ignored="^${PACKAGE_PATH}/(" |
| 143 | + # Tests and stories. |
| 144 | + ignored+="(.+/)?(stories|test|__tests__)/" |
| 145 | + # Markdown: docs, READMEs and the CHANGELOG itself. |
| 146 | + ignored+="|.+\.(md|mdx)$" |
| 147 | + # Storybook files outside a stories directory. |
| 148 | + ignored+="|(.+/)?([^/]+\.stories\.[^/]+|storybook\.d\.ts)$" |
| 149 | + # Dev tooling configs at the package root. Configs a package |
| 150 | + # ships, such as `packages/scripts/config/`, and TypeScript |
| 151 | + # configs that can affect the build (`tsconfig.json`, |
| 152 | + # `tsconfig.build.json`, `tsconfig.plugins.json`) still count. |
| 153 | + ignored+="|(tsconfig\.(stories|test|bin)\.json|\.(stylelintrc|eslintrc|prettierrc)[^/]*|\.gitignore)$" |
| 154 | + ignored+=")" |
| 155 | +
|
130 | 156 | relevant_changes=$(git diff --name-only "$BASE_SHA"...HEAD -- "${PACKAGE_PATH}/" \ |
131 | | - | grep -Ev "^${PACKAGE_PATH}/((.+/)?(stories|test|__tests__)/|CHANGELOG\.md$)" || true) |
| 157 | + | grep -Ev "$ignored" || true) |
132 | 158 |
|
133 | 159 | if [ -z "$relevant_changes" ]; then |
134 | 160 | echo "No relevant changes under ${PACKAGE_PATH}; skipping CHANGELOG presence check." |
|
0 commit comments