Skip to content

karpikpl/list-changed-files-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

List files changed in a Pull Request

GitHub Super-Linter CI

GitHub Action that lists all files changed (were added, modified) in the provided pull request.

Usage

Basic

You need to add permissions for this tool.

permissions:
  contents: read
uses: karpikpl/[email protected]

To get a list of Python files changed in a PR:

uses: karpikpl/[email protected]
with:
  file-filter: '*.py'

Inputs

file-filter

Optional Glob file filter to apply on the changed files in the pull request. E.g. *.py. Default: no filter.

pull-number

Optional ID of the pull request. Action will try to use pull request number from GitHub event.

repo-owner

Optional Another repository owner, If not set, the current repository owner is used by default. Note that when you trying changing a repository, be aware that GITHUB_TOKEN should also have permission for that repository.

repo-name

Optional Another repository name. Of limited use on GitHub enterprise. If not set, the current repository is used by default. Note that when you trying changing a repository, be aware that GITHUB_TOKEN should also have permission for that repository.

repo-token

Optional, You can set PAT here. If not set, this will use ${{ github.token }}.

Outputs

changed_files

Space separated list of files changed (added, modified) in the pull request that match provided file-filter.

e.g. 'file1.py' 'file2.py'

head_sha

Head sha commit ID from the pull request.

base_sha

Base sha commit ID from the pull request.

result

The result of the action. Success, Failure or information message. Useful for debugging.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published