Add .github
This commit is contained in:
parent
e4c9c292e5
commit
95ced89d5e
7 changed files with 213 additions and 0 deletions
50
.github/workflows/issues-stale.yml
vendored
Normal file
50
.github/workflows/issues-stale.yml
vendored
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
name: Stale Issues / PRs
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '00 19 * * *'
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
name: Check Issues / PRs
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Stale
|
||||
uses: actions/stale@v3
|
||||
with:
|
||||
stale-issue-message: >
|
||||
This issue is stale because it has been open for 30 days with no activity.
|
||||
Remove the stale label or comment, otherwise this will be closed in 5 days.
|
||||
close-issue-message: >
|
||||
This issue was closed because it has been stalled for 5 days with no activity.
|
||||
stale-issue-label: 'stale'
|
||||
exempt-issue-labels: 'added,fixed,type:enhancement,status:awaiting-triage,status:in-progress'
|
||||
stale-pr-message: >
|
||||
This PR is stale because it has been open for 30 days with no activity.
|
||||
Remove the stale label or comment, otherwise this will be closed in 5 days.
|
||||
close-pr-message: >
|
||||
This PR was closed because it has been stalled for 5 days with no activity.
|
||||
stale-pr-label: 'stale'
|
||||
exempt-pr-labels: 'status:in-progress'
|
||||
days-before-stale: 30
|
||||
days-before-close: 5
|
||||
|
||||
- name: Invalid Template
|
||||
uses: actions/stale@v3
|
||||
with:
|
||||
stale-issue-message: >
|
||||
Invalid issues template.
|
||||
close-issue-message: >
|
||||
This issue was closed because the the template was not completed after 5 days.
|
||||
stale-issue-label: 'invalid:template-incomplete'
|
||||
skip-stale-issue-message: true
|
||||
stale-pr-message: >
|
||||
Invalid PR template.
|
||||
close-pr-message: >
|
||||
This PR was closed because the the template was not completed after 5 days.
|
||||
stale-pr-label: 'invalid:template-incomplete'
|
||||
exempt-pr-labels: 'status:in-progress'
|
||||
skip-stale-pr-message: true
|
||||
only-labels: 'invalid:template-incomplete'
|
||||
days-before-stale: 0
|
||||
days-before-close: 5
|
||||
15
.github/workflows/issues.yml
vendored
Normal file
15
.github/workflows/issues.yml
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
name: Issues
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [labeled, unlabeled]
|
||||
|
||||
jobs:
|
||||
label:
|
||||
name: Label Issues
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Label Issues
|
||||
uses: dessant/label-actions@v2
|
||||
with:
|
||||
github-token: ${{ github.token }}
|
||||
35
.github/workflows/pull-requests.yml
vendored
Normal file
35
.github/workflows/pull-requests.yml
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
name: Pull Requests
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [opened, synchronize, edited, reopened]
|
||||
|
||||
jobs:
|
||||
check-branch:
|
||||
name: Check Pull Request
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Branch check
|
||||
if: ( github.head_ref == 'repo-sync/common-repo-files/default' && github.base_ref == 'master' ) || ( github.head_ref == 'nightly' && github.base_ref == 'master' )
|
||||
run: |
|
||||
echo Base: "$GITHUB_BASE_REF"
|
||||
echo Head: "$GITHUB_HEAD_REF"
|
||||
echo "branch=True" >> $GITHUB_ENV
|
||||
|
||||
- name: Comment on Pull Request
|
||||
uses: mshick/add-pr-comment@v1
|
||||
if: github.base_ref != 'nightly' && env.branch != 'True'
|
||||
with:
|
||||
message: Pull requests must be made to the `nightly` branch. Thanks.
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
repo-token-user-login: 'github-actions[bot]'
|
||||
|
||||
- name: Fail Workflow
|
||||
if: github.base_ref != 'nightly' && env.branch != 'True'
|
||||
run: |
|
||||
echo Base: "$GITHUB_BASE_REF"
|
||||
echo Head: "$GITHUB_HEAD_REF"
|
||||
exit 1
|
||||
Loading…
Add table
Add a link
Reference in a new issue