"Possible Page Impact" is an Action that comments which pages the PR changes may affect.
Below is a simple example.
Matches page files (page.tsx
) that do not include internal
name: Possible Impact Report
on:
pull_request:
types: [opened, synchronize]
jobs:
comment-report:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cut0/possible-page-impact@main
with:
app_dir: "./src"
pages_regex: "^(?!.*\\/internal\\/).*\\/page\\.tsx$"
And the comment is as follows:
Name | Description |
---|---|
app_dir* | Specify the target project. Specify the relative path from the root. |
pages_regex | Describe the page file pattern using regular expressions. (ex: src\/pages.\*\/index\.tsx ) |
pages_pattern | Use glob to specify page patterns. (ex: src/pages/**/index.tsx ) |
Here is an example:
Dependencies between files are analyzed using the AST of import/export statements. For this purpose, https://github.com/cut0/depon is used internally.