Skip to content

ankitjain28may/list-files-in-pr

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 in PR

List the files in the pull request in Github Actions. This package is using the Graphql GitHub APIs for fetching the list of files changed in a particular pull request. It is currently enabled for the pull_request type of events only.

The output will be available via the steps output context.

Usage

Check the actions.yml for the complete format of the required inputs and outputs.

  - uses: ankitjain28may/[email protected]
    with:
      githubToken: ${{ github.token }}
      outputFormat: 'json' # It can be csv, new-line, space-delimited as well. default is json

Get the list of files in a PR

  - uses: ankitjain28may/[email protected]
    id: list-files
    with:
      githubToken: ${{ github.token }}
      outputFormat: 'space-delimited'
  - run: |
      for file in ${{ steps.list-files.outputs.pullRequestFiles }}; do
        echo "Changed Files - ${file}."
      done

License

Copyright (c) 2020 Ankit Jain - Released under MIT License

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published