Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/umani/changed-files
GitHub action to export a PR's changed files
https://github.com/umani/changed-files
ci github github-actions typescript workflows
Last synced: 3 months ago
JSON representation
GitHub action to export a PR's changed files
- Host: GitHub
- URL: https://github.com/umani/changed-files
- Owner: umani
- License: mit
- Created: 2019-09-02T16:08:23.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-07-18T14:10:03.000Z (7 months ago)
- Last Synced: 2024-10-14T13:31:17.223Z (4 months ago)
- Topics: ci, github, github-actions, typescript, workflows
- Language: TypeScript
- Size: 1.91 MB
- Stars: 28
- Watchers: 4
- Forks: 16
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Changed Files Action
This GitHub action applies to pull request and merge group workflow triggers and populates 3 output variables with the modified files. They are: "files_created", "files_updated", and "files_deleted".
### Workflow Config Example
```
- name: Changed Files Exporter
uses: umani/[email protected]
with:
repo-token: ${{ github.token }}
pattern: '^.*\.(md|markdown)$'
```### Inputs
- **`repo-token`**: GitHub Access Token
- **`pattern`** (optional): A regular expression to filter the outputs by. Defaults to `'.*'`.
- **`pr-number`** (optional): The pull request number. If not provided, the pull request is inferred from the given context. Useful for actions running outside the `pull_request` event context.
- **`result-encoding`** (optional): The encoding for the output values, either `'string'` (default) or `'json'`.### Outputs
All output values are either a space-separated string, or a JSON encoded array.
- **`files_created`**: Created files
- **`files_created_count`**: Number of created files
- **`files_updated`**: Updated files
- **`files_updated_count`**: Number of updated files
- **`files_deleted`**: Deleted files
- **`files_deleted_count`**: Number of deleted files
- **`total_modified_count`**: The sum of all `*_count` outputs