Skip to content

Commit 0cb6264

Browse files
committed
Add workflows
1 parent 0a834ff commit 0cb6264

File tree

14 files changed

+487
-0
lines changed

14 files changed

+487
-0
lines changed
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
---
2+
name: Bug report
3+
description: Create a bug report.
4+
title: "[Bug] "
5+
labels:
6+
- bug
7+
assignees:
8+
- thomasleplus
9+
body:
10+
- type: markdown
11+
attributes:
12+
value: |
13+
Thanks for taking the time to fill out this bug report!
14+
- type: checkboxes
15+
attributes:
16+
label: Is there an existing issue for this?
17+
description: Search to see if an issue already exists for the bug you encountered.
18+
options:
19+
- label: I have searched the existing issues
20+
required: true
21+
- type: textarea
22+
attributes:
23+
label: Current Behavior
24+
description: A concise description of what you're experiencing.
25+
validations:
26+
required: true
27+
- type: textarea
28+
attributes:
29+
label: Expected Behavior
30+
description: A concise description of what you expected to happen.
31+
validations:
32+
required: true
33+
- type: textarea
34+
attributes:
35+
label: version
36+
description: |
37+
Version where you observed this issue
38+
placeholder: |
39+
vX.Y.Z
40+
render: markdown
41+
validations:
42+
required: true
43+
- type: textarea
44+
id: logs
45+
attributes:
46+
label: Relevant log output
47+
description: |
48+
Copy and paste any relevant log output.
49+
This will be automatically formatted into code, so no need for backticks.
50+
Enable debug logging, either on GitHub Actions, or when running locally.
51+
render: shell
52+
validations:
53+
required: true
54+
- type: textarea
55+
attributes:
56+
label: Steps To Reproduce
57+
description: |
58+
Steps to reproduce the issue.
59+
placeholder: |
60+
1. In this environment...
61+
1. With this config...
62+
1. Run '...'
63+
1. See error...
64+
validations:
65+
required: true
66+
- type: textarea
67+
attributes:
68+
label: Anything else?
69+
description: |
70+
Links? References? Anything that will give us more context about the issue you are encountering!
71+
72+
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
73+
validations:
74+
required: false
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
name: Feature request
3+
description: Suggest a new feature for this project.
4+
title: "[Feature] "
5+
labels:
6+
- enhancement
7+
assignees:
8+
- thomasleplus
9+
body:
10+
- type: markdown
11+
attributes:
12+
value: |
13+
Thanks for taking the time to fill out this feature request!
14+
- type: textarea
15+
attributes:
16+
label: Feature description
17+
description: |
18+
A clear and concise description of what the desired feature is and why it would be useful.
19+
render: markdown
20+
validations:
21+
required: true
22+
- type: textarea
23+
attributes:
24+
label: Anything else?
25+
description: |
26+
If you think that there are some implementation details to be taken into consideration, or anything that is not obvious from the previous description, please specify it here.
27+
28+
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
29+
render: markdown
30+
validations:
31+
required: false
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Question
3+
description: Ask a question.
4+
title: "[Question] "
5+
labels:
6+
- question
7+
assignees:
8+
- thomasleplus
9+
body:
10+
- type: markdown
11+
attributes:
12+
value: |
13+
Thanks for taking the time to fill out this feature request!
14+
- type: textarea
15+
attributes:
16+
label: What is your question?
17+
description: Please include as many details and examples as possible.
18+
render: markdown
19+
validations:
20+
required: true

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
version: 2
3+
updates:
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "daily"

.github/pull_request_template.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!-- prettier-ignore-start -->
2+
<!-- markdownlint-disable-next-line MD041 -->
3+
## Readiness checklist
4+
<!-- prettier-ignore-end -->
5+
6+
Please check the boxes below to confirm that you have followed the
7+
required guidelines for contributions:
8+
9+
- [ ] If this pull request includes code changes, they were all properly tested. Automated tests were also included where possible.
10+
- [ ] If applicagle, this pull request includes the relevant documentation for this change.
11+
- [ ] If this pull request is related to an existing issue, you can use the same description below but in any case include a [link](https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/linking-a-pull-request-to-an-issue) like `Fixes #ISSUE_NUMBER.` or `Closese #ISSUE_NUMBER.`.
12+
- [ ] All the commits in this pull request were squashed into a single commit. That commit is [signed](https://docs.github.com/en/authentication/managing-commit-signature-verification).
13+
14+
<!-- prettier-ignore-start -->
15+
<!-- markdownlint-disable-next-line MD041 -->
16+
## Description
17+
<!-- prettier-ignore-end -->

.github/workflows/automerge.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
name: "Dependabot auto-merge"
3+
on: pull_request
4+
5+
permissions:
6+
actions: write
7+
contents: write
8+
pull-requests: write
9+
10+
jobs:
11+
dependabot:
12+
runs-on: ubuntu-latest
13+
if: ${{ github.actor == 'dependabot[bot]' }}
14+
steps:
15+
- name: Authenticate CLI with a PAT
16+
env:
17+
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
18+
if: env.RELEASE_TOKEN != ''
19+
shell: bash
20+
run: echo "${RELEASE_TOKEN}" | gh auth login --with-token
21+
- name: Enable auto-merge for Dependabot PRs
22+
shell: bash
23+
run: |
24+
# Checking the PR title is a poor substitute for the actual PR changes
25+
# but as long as this is used only with dependabot PRs,
26+
# it should be safe to assume that the title is not misleading.
27+
regexp='^Bump .* from [0-9]+\.[0-9]+(\.[0-9]+)?(\.[0-9]+)?(\-[a-z]+)? to [0-9]+\.[0-9]+(\.[0-9]+)?(\.[0-9]+)?(\-[a-z]+)?( in .*)?$'
28+
if ! [[ "${PR_TITLE}" =~ ${regexp} ]] ; then
29+
echo 'Non-semver upgrade, needs manual review.'
30+
elif [ "${BASH_REMATCH[3]}" != "${BASH_REMATCH[6]}" ] ; then
31+
echo 'Version suffixes do not match, needs manual review.'
32+
else
33+
echo 'Automated review approval.'
34+
gh pr review --approve "${PR_URL}"
35+
fi
36+
gh pr merge --auto --squash "${PR_URL}"
37+
env:
38+
PR_TITLE: ${{github.event.pull_request.title}}
39+
PR_URL: ${{github.event.pull_request.html_url}}
40+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
---
2+
# For most projects, this workflow file will not need changing; you simply need
3+
# to commit it to your repository.
4+
#
5+
# You may wish to alter this file to override the set of languages analyzed,
6+
# or to provide custom queries or build logic.
7+
#
8+
name: "CodeQL"
9+
10+
on:
11+
push:
12+
pull_request:
13+
schedule:
14+
- cron: "0 0 * * 0"
15+
workflow_dispatch:
16+
17+
permissions: {}
18+
19+
jobs:
20+
analyze:
21+
name: Analyze
22+
runs-on: ubuntu-latest
23+
# Ignore PRs coming from forks or from dependabot since they don't have the required permissions.
24+
if: ${{ (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && github.actor != 'dependabot[bot]' }}
25+
permissions:
26+
actions: read
27+
contents: read
28+
security-events: write
29+
30+
strategy:
31+
fail-fast: false
32+
matrix:
33+
language: ["javascript"]
34+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
35+
# Learn more:
36+
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
37+
38+
steps:
39+
- name: Checkout repository
40+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
41+
42+
# Initializes the CodeQL tools for scanning.
43+
- name: Initialize CodeQL
44+
uses: github/codeql-action/init@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
45+
with:
46+
languages: ${{ matrix.language }}
47+
# If you wish to specify custom queries, you can do so here or in a config file.
48+
# By default, queries listed here will override any specified in a config file.
49+
# Prefix the list here with "+" to use these queries and those in the config file.
50+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
51+
queries: +security-and-quality
52+
53+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
54+
# If this step fails, then you should remove it and run the build manually (see below)
55+
- name: Autobuild
56+
uses: github/codeql-action/autobuild@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
57+
58+
# ℹ️ Command-line programs to run using the OS shell.
59+
# 📚 https://git.io/JvXDl
60+
61+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
62+
# and modify them (or add more) to build your code if your project
63+
# uses a compiled language
64+
65+
#- run: |
66+
# make bootstrap
67+
# make release
68+
69+
- name: Perform CodeQL Analysis
70+
uses: github/codeql-action/analyze@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
name: "Dependency Review"
3+
on: [pull_request]
4+
5+
permissions:
6+
contents: read
7+
8+
jobs:
9+
dependency-review:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: "Checkout Repository"
13+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
14+
- name: "Dependency Review"
15+
uses: actions/dependency-review-action@0659a74c94536054bfa5aeb92241f70d680cc78e # v4

.github/workflows/devskim.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
# This workflow uses actions that are not certified by GitHub.
3+
# They are provided by a third-party and are governed by
4+
# separate terms of service, privacy policy, and support
5+
# documentation.
6+
7+
name: DevSkim
8+
9+
on:
10+
push:
11+
branches: ["main"]
12+
pull_request:
13+
branches: ["main"]
14+
schedule:
15+
- cron: "0 0 * * 0"
16+
17+
permissions: {}
18+
19+
jobs:
20+
lint:
21+
name: DevSkim
22+
runs-on: ubuntu-latest
23+
permissions:
24+
actions: read
25+
contents: read
26+
security-events: write
27+
steps:
28+
- name: Checkout code
29+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
30+
31+
- name: Run DevSkim scanner
32+
uses: microsoft/DevSkim-Action@4b5047945a44163b94642a1cecc0d93a3f428cc6 # v1.0.16
33+
34+
- name: Upload DevSkim scan results to GitHub Security tab
35+
uses: github/codeql-action/upload-sarif@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
36+
with:
37+
should-scan-archives: true
38+
sarif_file: devskim-results.sarif

.github/workflows/jslint.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: "JSLint"
3+
4+
on:
5+
push:
6+
pull_request:
7+
schedule:
8+
- cron: "0 0 * * 0"
9+
workflow_dispatch:
10+
11+
permissions: {}
12+
13+
jobs:
14+
lint:
15+
name: Check with JSLint
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Check out
19+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
20+
- name: Install JSLint
21+
shell: bash
22+
run: sudo npm install -g jslint
23+
- name: Run JSLint
24+
shell: bash
25+
run: jslint --browser javascripts/*.js

0 commit comments

Comments
 (0)