Skip to content

Commit

Permalink
ci(github): copy linked and dependent issues workflows (#520)
Browse files Browse the repository at this point in the history
* ci(github): copy linked and dependent issues workflows

* add PR label config
  • Loading branch information
andrewazores authored Sep 26, 2022
1 parent 3b52765 commit bb8b4db
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/dependent-issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Dependent Issues

on:
issues:
types:
- opened
- edited
- reopened
pull_request_target:
types:
- opened
- edited
- reopened
- synchronize

# Schedule a daily check. Used in referencing cross-repository
# issues or pull requests
schedule:
- cron: '0 0 * * *'

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: z0al/dependent-issues@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
# (Optional) Enable checking for dependencies in issues.
# Enable by setting the value to "on". Default "off"
check_issues: off

keywords: depends on, blocked by, based on
23 changes: 23 additions & 0 deletions .github/workflows/linked-issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Verify Linked Issue

on:
pull_request:
types:
- opened
- reopened
- edited
- synchronize

jobs:
verify-linked-issue:
runs-on: ubuntu-latest
if: github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]'
name: Verify Pull Request references Issue
steps:
- uses: Codeinwp/verify-linked-issue-action@6da9af91d78847c7ea264083a64eab3271b4369f
id: verify_issue_reference
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Report no referenced issue
if: steps.verify_issue_reference.outputs.has_linked_issues != 'true'
run: exit 1;
19 changes: 19 additions & 0 deletions .github/workflows/pr-labeled.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Require semantic labels

on:
pull_request:
types:
- opened
- labeled
- unlabeled
- synchronize

jobs:
check-pr-label-and-comment:
runs-on: ubuntu-latest
steps:
- uses: yashhy/pr-label-check-and-comment-action@v1.0.1
with:
# This list is duplicated from release-drafter.yml
required_labels: 'chore,ci,cleanup,docs,feat,fix,perf,refactor,style,test'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit bb8b4db

Please sign in to comment.