Replaces and formats keywords in titles of issues and PRs
MIT License
Replaces, formats or removes keywords in titles of issues and PRs.
Enforce a format for certain words:
- "monorepo-package" SyntaxError: ๐ not allowed here
+ `monorepo-package` - SyntaxError: ๐ not allowed here
Auto-fix common misspellings
- RGBA colours are not supported
+ RGBA colors are not supported
Ensure your brand is untarnished by lowercaseness:
- Lost all files due to steam
+ Lost all files due to Steam
You can automatically install a demo workflow with ghat:
npx -y ghat fregante/title-replacer-action/workflow
name: Labeler
on:
pull_request_target:
types: [opened, edited]
issues:
types: [opened, edited]
jobs:
Label:
runs-on: ubuntu-latest
permissions:
pull-requests: write
issues: write
steps:
- name: Turn keywords into `keywords`
uses: fregante/title-replacer-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
patterns: alpha, omega
replacement: '`$0`'
- name: Turn keywords from file into `keywords`
uses: fregante/title-replacer-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
patterns-path: source/list.txt
replacement: '($0)'
- name: Read list of files in directory, use the extension-less names as patterns
uses: fregante/title-replacer-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
patterns-path: source/features
replacement: '[$0]'
# The action can be used as many times as needed in a single job
- uses: fregante/title-replacer-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
patterns: |
alpha
omega
replacement: '$0: '
- uses: fregante/title-replacer-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
patterns: /^fix(es)?/i
replacement: 'fix: '
See action.yml
See action.yml