Skip to content

Latest commit

 

History

History
35 lines (25 loc) · 1.06 KB

README.md

File metadata and controls

35 lines (25 loc) · 1.06 KB

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: razorpay/[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: razorpay/[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