-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added additional workflow actions [#4]
- Loading branch information
Showing
4 changed files
with
108 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: 'Commit Message Check' | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- edited | ||
- reopened | ||
- synchronize | ||
|
||
jobs: | ||
check-commit-message: | ||
name: Check Commit Message | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Load PR commits | ||
id: 'get-pr-commits' | ||
uses: tim-actions/get-pr-commits@master | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Subject line length | ||
uses: tim-actions/[email protected] | ||
with: | ||
commits: ${{ steps.get-pr-commits.outputs.commits }} | ||
pattern: '^.{0,75}(\n.*)*$' | ||
error: 'Subject too long (max 75)' | ||
|
||
- name: Subject must be an imperative statement | ||
if: ${{ success() || failure() }} | ||
uses: tim-actions/[email protected] | ||
with: | ||
commits: ${{ steps.get-pr-commits.outputs.commits }} | ||
pattern: '^(Added|Changed|Deprecated|Removed|Fixed|Security|Bump)' | ||
error: 'Subject must start with one of: Added, Changed, Deprecated, Removed, Fixed, Security or Bump' | ||
|
||
- name: Subject must reference an issue number | ||
if: ${{ success() || failure() }} | ||
uses: tim-actions/[email protected] | ||
with: | ||
commits: ${{ steps.get-pr-commits.outputs.commits }} | ||
pattern: '^.*\[\#[\d]+\](\n.*)*$' | ||
error: 'Subject must end with the issue number being addressed' | ||
|
||
- name: Subject must not end with a sentence | ||
if: ${{ success() || failure() }} | ||
uses: tim-actions/[email protected] | ||
with: | ||
commits: ${{ steps.get-pr-commits.outputs.commits }} | ||
pattern: '^.+[^.][ ]+\[\#[\d]+\](\n.*)*$' | ||
error: 'Subject must not end with a period' | ||
|
||
- name: Check Body Line Length | ||
if: ${{ success() || failure() }} | ||
uses: tim-actions/[email protected] | ||
with: | ||
commits: ${{ steps.get-pr-commits.outputs.commits }} | ||
pattern: '^.+(\n.{0,79})*$' | ||
error: 'Body line too long (max 79)' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# GOAL: Close issues where the reporter was asked for information and did not provide it. | ||
# Runs hourly, and on issue events. | ||
|
||
name: Close Stale Issue | ||
|
||
on: | ||
schedule: | ||
- cron: "0 0 * * *" | ||
issue_comment: | ||
types: [created, edited, reopened] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Close issues that have gone unanswered for more than 4 weeks | ||
uses: dwieeb/needs-reply@v2 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
issue-label: needs-reply | ||
days-before-close: 28 | ||
close-message: "Issue closed due to inactivity. If the reported problem still occurs, please re-open this issue or file a new bug report." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# GOAL: Removes the needs-reply label from an issue | ||
|
||
name: Remove Needs Reply Label | ||
|
||
on: | ||
issue_comment: | ||
types: | ||
- created | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
if: | | ||
github.event.comment.author_association != 'OWNER' && | ||
github.event.comment.author_association != 'COLLABORATOR' | ||
steps: | ||
- name: Remove needs-reply label | ||
uses: octokit/[email protected] | ||
continue-on-error: true | ||
with: | ||
route: DELETE /repos/:repository/issues/:issue/labels/:label | ||
repository: ${{ github.repository }} | ||
issue: ${{ github.issue.number }} | ||
label: needs-reply | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters