2024-03-17 06:18:13 +01:00
|
|
|
name: Check PR title
|
|
|
|
|
2024-03-15 04:08:33 +01:00
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
types:
|
|
|
|
- opened
|
|
|
|
- edited
|
|
|
|
- reopened
|
|
|
|
|
|
|
|
jobs:
|
2024-03-17 06:18:13 +01:00
|
|
|
check_pr_title:
|
2024-03-15 04:08:33 +01:00
|
|
|
runs-on: debian
|
|
|
|
steps:
|
|
|
|
- uses: https://code.forgejo.org/actions/checkout@v4
|
2024-03-17 06:18:13 +01:00
|
|
|
- name: Install git-sumi
|
|
|
|
run: |
|
|
|
|
curl -s -L "https://github.com/welpo/git-sumi/releases/download/v0.0.6/git-sumi-x86_64-unknown-linux-gnu.tar.xz" -o git-sumi.tar.xz
|
2024-03-15 04:08:33 +01:00
|
|
|
tar -xf git-sumi.tar.xz
|
|
|
|
mv git-sumi-x86_64-unknown-linux-gnu/git-sumi git-sumi
|
|
|
|
chmod +x git-sumi
|
2024-03-17 06:18:13 +01:00
|
|
|
- name: Run git-sumi
|
2024-05-05 21:57:01 +02:00
|
|
|
run: |
|
|
|
|
# Check if the PR are WIP or not (Start with WIP: or wip:)
|
|
|
|
IS_WIP=$(echo ${{ github.event.pull_request.title }} | grep -i "^WIP:" | wc -l)
|
|
|
|
if [ $IS_WIP -eq 1 ]; then
|
|
|
|
echo "Is Work In Progress PR"
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
./git-sumi "${{ github.event.pull_request.title }}"
|