Skip to content

Marks specified statuses as successful if pull request changed files all match the specified globs.

License

Notifications You must be signed in to change notification settings

crossnokaye/diff-status-action

Repository files navigation

Diff Status Action

A GitHub Action that validates changed files against glob patterns and updates status checks accordingly.

Usage

name: Validate Changed Files
on:
  pull_request:
    types: [opened, synchronize]

jobs:
  validate:
    runs-on: ubuntu-latest
    steps:
      - uses: xeger/diff-status-action@v1
        with:
          globs: |
            **/*.md
            LICENSE
          statuses: |
            deploy-production
            deploy-staging
          token: ${{ secrets.GITHUB_TOKEN }}

Inputs

token

Required The GitHub token used to authenticate API requests. Typically ${{ secrets.GITHUB_TOKEN }}.

globs

Required A newline-separated list of glob patterns to match against changed files. Each changed file must match at least one pattern.

statuses

Required A newline-separated list of status check names to update. All statuses will be marked as successful if all files match the glob patterns.

Outputs

None.

Development

  1. Install dependencies:

    npm install
  2. Build the action:

    npm run build
  3. Run tests:

    npm test

License

MIT

About

Marks specified statuses as successful if pull request changed files all match the specified globs.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published