2021-01-25 11:39:46 +00:00
|
|
|
name: Pull Request Labels
|
|
|
|
|
2020-12-13 17:25:25 +00:00
|
|
|
on:
|
|
|
|
pull_request:
|
2021-01-25 17:34:18 +00:00
|
|
|
types:
|
|
|
|
- opened
|
2020-12-13 17:25:25 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
pr-labeler:
|
2021-01-25 11:39:46 +00:00
|
|
|
|
|
|
|
name: Pull Request Labels
|
2020-12-13 17:25:25 +00:00
|
|
|
runs-on: ubuntu-latest
|
2021-01-25 17:44:21 +00:00
|
|
|
if: github.repository == 'Slimefun/Slimefun4' && github.actor != 'gitlocalize-app[bot]' && github.actor != 'renovate[bot]'
|
2021-01-25 11:39:46 +00:00
|
|
|
|
2020-12-13 17:25:25 +00:00
|
|
|
steps:
|
2021-01-25 16:20:19 +00:00
|
|
|
- uses: WalshyDev/pr-labels@v1.1
|
2021-01-25 17:30:47 +00:00
|
|
|
id: labeller
|
2021-01-25 11:39:46 +00:00
|
|
|
name: Apply labels based on branch
|
2020-12-13 17:25:25 +00:00
|
|
|
with:
|
2021-01-25 11:37:37 +00:00
|
|
|
token: "${{ secrets.ACCESS_TOKEN }}"
|
2021-01-25 11:39:46 +00:00
|
|
|
feature: '🎈 Feature'
|
|
|
|
fix: '✨ Fix'
|
|
|
|
chore: '🧹 Chores'
|
|
|
|
performance: '💡 Performance Optimization'
|
2021-01-25 17:44:21 +00:00
|
|
|
|
2021-01-25 17:30:47 +00:00
|
|
|
- uses: thollander/actions-comment-pull-request@1.0.1
|
|
|
|
name: Comment the applied label
|
|
|
|
if: ${{ steps.labeller.outputs.applied != 0 }}
|
|
|
|
with:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
|
2021-01-25 17:44:21 +00:00
|
|
|
message: |
|
|
|
|
Your Pull Request was automatically labelled as: ${{ steps.labeller.outputs.applied }}
|
|
|
|
Thank you for contributing to this project! ❤️
|
|
|
|
|
2021-01-25 17:30:47 +00:00
|
|
|
- uses: thollander/actions-comment-pull-request@1.0.1
|
|
|
|
name: Comment the applied label
|
|
|
|
if: ${{ steps.labeller.outputs.applied == 0 }}
|
|
|
|
with:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
|
|
|
|
message: |
|
2021-01-25 17:44:21 +00:00
|
|
|
**Pro Tip!**
|
2021-01-25 17:47:15 +00:00
|
|
|
You can help us label your Pull Requests by using the following branch naming convention next time you create a pull request. ❤️
|
2021-01-25 17:44:21 +00:00
|
|
|
Branch naming convention | Label
|
2021-01-25 17:44:52 +00:00
|
|
|
------------------------ | ------
|
|
|
|
`feature/**` | 🎈 Feature
|
|
|
|
`fix/**` | ✨ Fix
|
2021-01-25 17:47:15 +00:00
|
|
|
`chore/**` | 🧹 Chores
|
2021-01-25 17:44:52 +00:00
|
|
|
`performance/**` | 💡 Performance Optimization
|
2021-01-25 17:44:21 +00:00
|
|
|
<hr>
|
|
|
|
If your changes do not fall into any of these categories, don't worry.
|
|
|
|
You can just ignore this message in that case! 👀
|