Skip to content

Comment on the possible impact of the PR changes on the page

License

Notifications You must be signed in to change notification settings

cut0/possible-page-impact

Repository files navigation

Possible Page Impact

"Possible Page Impact" is an Action that comments which pages the PR changes may affect.

Usage

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:

comment

Inputs

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)

Example

Here is an example:

Supplement

Dependencies between files are analyzed using the AST of import/export statements. For this purpose, https://github.com/cut0/depon is used internally.

About

Comment on the possible impact of the PR changes on the page

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published