Skip to content

Commit

Permalink
Update GH-related config, actions, etc.
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Boothe <git@rootwork.org>
  • Loading branch information
rootwork committed Nov 9, 2021
1 parent 3ca3d8d commit 19bc535
Show file tree
Hide file tree
Showing 14 changed files with 429 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* @premail
* @rootwork
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: rootwork
36 changes: 36 additions & 0 deletions .github/ISSUE_TEMPLATE/01_BUG_REPORT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: Bug Report
about: Report an issue and help us improve
title: 'bug: '
labels: 'Type: Bug'
assignees: ''
---

# Bug Report

<!-- Security note: If you're reporting a vulnerability or other security issue,
please see https://premail.dev/security/ for the procedure. -->

**Current behavior:**

<!-- Describe how the bug shows up. -->

**Expected behavior:**

<!-- Describe what you expect the behavior to be without the bug. -->

**Steps to reproduce:**

<!-- Explain the steps required to duplicate the issue, especially if you are able to provide a sample application. -->

**Related code:**

<!-- If you are able to illustrate the bug or feature request with an example, please provide it here. -->

```
insert short code snippets here
```

**Other information:**

<!-- List any other information that is relevant to your issue: Suggestions on fixes, related issues, links to relevant information, etc. -->
43 changes: 43 additions & 0 deletions .github/ISSUE_TEMPLATE/02_FEATURE_REQUEST.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
name: Feature Request
about: Suggest an idea
title: 'feat: '
labels: 'Type: Feature'
assignees: ''
---

# Feature Request

**Type of feature**

- [ ] New functionality
- [ ] Performance
- [ ] Code refactoring (e.g. to be simpler or easier to understand)
- [ ] Developer Experience (DX)
- [ ] Other (please describe):

**Describe the feature**

<!-- A clear and concise description of your feature request. Please note if your request is related to a problem. -->

**Describe preferred solution**

<!-- A clear and concise description of what you want to happen. -->

**Describe alternatives**

<!-- A clear and concise description of any alternative solutions or features you've considered. -->

**Related code**

<!-- If you are able to illustrate this request with an example, please provide it here. -->

**Additional context**

<!-- List any other information that is relevant to your issue. Use cases, screenshots, related issues, stack traces, links to relevant information, environment information if applicable, etc. -->

**If the feature request is approved, would you be willing to submit a PR?**
_(Help can be provided if you need assistance submitting a PR)_

- [ ] Yes
- [ ] No
9 changes: 9 additions & 0 deletions .github/ISSUE_TEMPLATE/03_SUPPORT_QUESTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name: Support Question
about: Question about how to use this component
title: 'support: '
labels: 'Type: Question'
assignees: ''
---

# Support Question
2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
blank_issues_enabled: false
40 changes: 40 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<!--- Please provide a general summary of your changes in the title above -->

## Pull Request type

<!-- Please try to limit your pull request to one type; submit multiple pull requests if needed. -->

Please check the type of change your PR introduces:

- [ ] Bugfix
- [ ] Feature
- [ ] Code style update (formatting, renaming)
- [ ] Refactoring (no functional changes, no API changes)
- [ ] Build-related changes
- [ ] Documentation content changes
- [ ] Other (please describe):

## What is the current behavior?

<!-- Please describe the current behavior that you are modifying, or link to a relevant issue. -->

Issue Number: N/A

## What is the new behavior?

<!-- Please describe the behavior or changes that are being added by this PR. -->

## -

-

## Does this introduce a breaking change?

- [ ] Yes
- [ ] No

<!-- If this does introduce a breaking change, please describe the impact and migration path for existing applications below. -->

## Other information

<!-- Any other information that is important to this PR, such as screenshots of how the component looks before and after the change. -->
92 changes: 92 additions & 0 deletions .github/labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
---
# Type

- name: 'Type: Bug'
color: b82c17
description:
'Problems in the program which will cause issues for users or implementors.'
- name: 'Type: Security'
color: b80083
description: 'Vulnerability or security risk.'
- name: 'Type: Feature'
color: 7f00ff
description: 'New functionality in this tool.'
- name: 'Type: Documentation'
color: 0000ff
description: 'In-tool documentation, both doc files and code comments.'
- name: 'Type: Question'
color: 80ff00
description:
'Requests for help on how to use the project, or general questions.'
- name: 'Type: Dependencies'
color: 555555
description: 'Change in project dependencies.'
- name: 'Type: Maintenance'
color: 555555
description: 'Generic maintenance tasks, including GitHub Actions.'

# Status

- name: 'Status: Available'
color: bee4be
description: 'Not currently being worked on. Take the lead!'
- name: 'Status: In Progress'
color: fef2c0
description: 'Work is underway.'
- name: 'Status: Update Needed'
color: e11d21
description: 'Missing necessary information or review.'
- name: 'Status: Blocked or Postponed'
color: 006a74
description: 'On hold.'
- name: 'Status: Done'
color: 000000
description: 'Completed.'
- name: "Status: Won't Fix"
color: cdcdcd
description:
'Outside project scope, off-topic, spam, or otherwise does not apply to this
project.'
- name: 'Status: Stale'
color: cdcdcd
description: 'No recent activity.'
- name: 'Status: Abandoned'
color: cdcdcd
description: 'No activity, considered abandoned.'

# Versions

- name: 'Version: Major'
color: 84b6eb
description: 'This will cause a major bump in the version number.'
- name: 'Version: Minor'
color: 84b6eb
description: 'This will cause a minor bump in the version number.'

# Priority

- name: 'Priority: Critical'
color: e11c20
- name: 'Priority: High'
color: eb6420
- name: 'Priority: Medium'
color: fbca04
- name: 'Priority: Low'
color: 84b6ea

# Welcome

- name: 'good first issue'
color: 2da44e
description:
'Beginner-friendly issue for people wanting to contribute to this project.'
- name: 'help wanted'
color: 2da44e
description:
'We need some extra helping hands or expertise in order to resolve this!'

# Bot (prefixed with "x" so they'll be listed last.)

- name: 'x-Bot: No Abandonment'
color: cdcdcd
description: 'This will never be marked abandoned by the status bot.'
51 changes: 51 additions & 0 deletions .github/workflows/codacy-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# This workflow checks out code, performs a Codacy security scan
# and integrates the results with the
# GitHub Advanced Security code scanning feature. For more information on
# the Codacy security scan action usage and parameters, see
# https://github.com/codacy/codacy-analysis-cli-action.
# For more information on Codacy Analysis CLI in general, see
# https://github.com/codacy/codacy-analysis-cli.

name: Codacy Security Scan

on:
push:
branches:
- '**'
pull_request:
# The branches below must be a subset of the branches above
branches:
- '**'
schedule:
- cron: '25 3 * * 0'

jobs:
codacy-security-scan:
name: Codacy Security Scan
runs-on: ubuntu-latest
steps:
# Checkout the repository to the GitHub Actions runner
- name: Checkout code
uses: actions/checkout@v2

# Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
- name: Run Codacy Analysis CLI
uses: codacy/codacy-analysis-cli-action@1.1.0
with:
# Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository
# You can also omit the token and run the tools that support default configurations
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
verbose: true
output: results.sarif
format: sarif
# Adjust severity of non-security issues
gh-code-scanning-compat: true
# Force 0 exit code to allow SARIF file generation
# This will handover control about PR rejection to the GitHub side
max-allowed-issues: 2147483647

# Upload the SARIF file generated in the previous step
- name: Upload SARIF results file
uses: github/codeql-action/upload-sarif@v1
with:
sarif_file: results.sarif
29 changes: 29 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: CodeQL

on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
schedule:
- cron: '30 1 * * 0'

jobs:
codeql:
name: 🏭 Scanning
runs-on: ubuntu-latest
permissions:
# required for all workflows
security-events: write
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@v2
- name: 🏗 Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: javascript
- name: 🚀 Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
21 changes: 21 additions & 0 deletions .github/workflows/labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Sync labels

on:
push:
branches:
- '**'
paths:
- .github/labels.yml

jobs:
labels:
name: ♻️ Sync labels
runs-on: ubuntu-latest
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@v2
- name: 🚀 Run Label Syncer
uses: micnncim/action-label-syncer@v1.2.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36 changes: 36 additions & 0 deletions .github/workflows/lock.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: Lock

on:
schedule:
- cron: '0 9 * * *'
workflow_dispatch:

jobs:
lock:
name: 🔒 Lock closed issues and PRs
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v2.0.3
with:
github-token: ${{ github.token }}
issue-lock-inactive-days: '90'
issue-lock-reason: ''
remove-issue-labels: 'Status: Stale'
add-issue-labels: 'Status: Abandoned'
issue-comment: >
Issue closed and locked due to lack of activity.
If you encounter this same issue, please open a new issue and refer
to this closed one.
pr-lock-inactive-days: '30'
pr-lock-reason: ''
remove-pr-labels: 'Status: Stale'
add-pr-labels: 'Status: Abandoned'
pr-comment: >
Pull Request closed and locked due to lack of activity.
If you'd like to build on this closed PR, you can clone it using
this method: https://stackoverflow.com/a/14969986
Then open a new PR, referencing this closed PR in your message.
20 changes: 20 additions & 0 deletions .github/workflows/pr-labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: PR Labels

on:
pull_request:
types: [opened, labeled, unlabeled, synchronize]

jobs:
pr_labels:
name: 🏭 Verify
runs-on: ubuntu-latest
steps:
- name: 🏷 Verify PR has a valid label
uses: jesusvasquez333/verify-pr-label-action@v1.4.0
with:
github-token: '${{ secrets.GITHUB_TOKEN }}'
valid-labels: >-
'Type: Bug', 'Type: Security', 'Type: Feature', 'Type:
Documentation', 'Type: Dependencies', 'Type: Maintenance'
disable-reviews: true
Loading

0 comments on commit 19bc535

Please sign in to comment.