Skip to content

razorpay/list-files-in-pr

 
 

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: 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

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%