Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/logerfo/newline-action
A GitHub Action that automatically fixes files without a new line at the end in pull requests.
https://github.com/logerfo/newline-action
actions newline
Last synced: 14 days ago
JSON representation
A GitHub Action that automatically fixes files without a new line at the end in pull requests.
- Host: GitHub
- URL: https://github.com/logerfo/newline-action
- Owner: Logerfo
- License: mit
- Created: 2019-10-24T13:15:25.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-10-18T22:40:13.000Z (27 days ago)
- Last Synced: 2024-10-26T11:36:59.574Z (20 days ago)
- Topics: actions, newline
- Language: JavaScript
- Homepage:
- Size: 4.7 MB
- Stars: 5
- Watchers: 2
- Forks: 4
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
[![Dependencies Status](https://david-dm.org/logerfo/newline-action/dev-status.svg)](https://david-dm.org/logerfo/newline-action?type=dev)
# Newline Action
This action will automatically fix files without a final new line in pull requests.
Only works for UTF-8 files.## Setting up
Create a file named `.github/workflows/newline.yml`.### Minimal configuration
```yml
name: Final new line
on:
pull_request:
types: [synchronize, opened]
jobs:
build:
name: New line
runs-on: ubuntu-16.04
steps:
- uses: actions/checkout@master
- uses: Logerfo/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }} # The `GITHUB_TOKEN` secret.
```### Complete configuration
All values are default.
```yml
name: Final new line
on:
pull_request:
types: [synchronize, opened]
jobs:
build:
name: New line
runs-on: ubuntu-16.04
steps:
- uses: actions/checkout@master
- uses: Logerfo/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }} # The `GITHUB_TOKEN` secret.
config-path: .github/newline.yml # The path of the addtional configurations file.
```### Additional configurations file
You can optionally create a additional configuration file. The default path is `.github/newline.yml`, but you can change it in the action configuration file, as shown above.
All values are default.
```yml
autoCommit: true # If false, the bot will still comment in the pull request, so you can known which files are wrong and fix them yourself.
ignorePaths: ["bin/**", "node_modules/**", "out/**"] # Globs to be ignored
```### Auto update
You can use (at your own risk) the `release` branch instead of the specific version tag.
Never user `master`, since the distribution file does not exist in this branch and the action will always fail.## Changelog
Click [here](CHANGELOG.md).## Contributing
If you have suggestions for how close-label could be improved, or want to report a bug, open an issue! We'd love all and any contributions.For more, check out the [Contributing Guide](CONTRIBUTING.md).
## Donate
BTC: 1LoGErFoNzE1gCA5fzk6A82nV6iJdKssSZ