Skip to content

Commit

Permalink
ci: tweak pr title check and stale bot
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisgrieser committed Dec 20, 2024
1 parent b4ebd8f commit 1499b46
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,21 +1,29 @@
name: Ensure Conventional Commits-like PR titles
name: PR title

on:
pull_request_target:
types: [opened, edited, synchronize]
types:
- opened
- edited
- synchronize
- reopened
- ready_for_review

permissions:
pull-requests: read

jobs:
semantic-pull-request:
name: Validate PR title
name: Check PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
# add `improv` to the list of allowed types
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
types: |
requireScope: false
subjectPattern: ^(?![A-Z]).+$ # disallow title starting with capital
types: | # add `improv` to the list of allowed types
improv
fix
feat
Expand All @@ -29,5 +37,3 @@ jobs:
docs
break
revert
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8 changes: 4 additions & 4 deletions .github/workflows/stale-bot.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Close stale issues and PRs"
name: Stale bot
on:
schedule:
- cron: "18 04 * * 3"
Expand All @@ -11,13 +11,13 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- name: Close Stale Issues
- name: Close stale issues
uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

# DOCS https://github.com/actions/stale?tab=readme-ov-file#all-options
days-before-stale: 180 # ~6 months
# DOCS https://github.com/actions/stale#all-options
days-before-stale: 180
days-before-close: 7
stale-issue-label: "Stale"
stale-issue-message: |
Expand Down

0 comments on commit 1499b46

Please sign in to comment.