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.
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
- 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
Copyright (c) 2020 Ankit Jain - Released under MIT License