Skip to content

Commit c4b1a0d

Browse files
committed
Merge branch 'master' into production
2 parents 0a71a21 + 6f0c1f3 commit c4b1a0d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+3491
-2945
lines changed

.github/workflows/cd.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@ name: CD
22

33
on:
44
push:
5-
branches:
6-
- production
7-
tags-ignore:
8-
- "**"
5+
branches: [production]
6+
tags-ignore: ["**"]
97

108
jobs:
119
release:
10+
if: ${{ ! startsWith(github.event.head_commit.message, 'chore(release)') }}
1211
permissions:
1312
contents: write
1413
issues: write

.github/workflows/ci.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,25 @@
1-
name: "CI"
1+
name: CI
2+
23
on:
34
push:
45
branches:
5-
- "master"
6-
- "hotfix/**"
6+
- master
7+
- "hotfix/*"
78
paths-ignore:
89
- ".github/**"
910
- "!.github/workflows/ci.yml"
10-
- ".gitignore"
11+
- .gitignore
1112
- "docs/**"
12-
- "README.md"
13-
- "LICENSE"
13+
- README.md
14+
- LICENSE
1415
pull_request:
16+
paths-ignore:
17+
- ".github/**"
18+
- "!.github/workflows/ci.yml"
19+
- .gitignore
20+
- "docs/**"
21+
- README.md
22+
- LICENSE
1523

1624
jobs:
1725
build:

.github/workflows/commitlint.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
name: Lint Commit Messages
2-
on: pull_request
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- "hotfix/*"
8+
pull_request:
39

410
jobs:
511
commitlint:

.github/workflows/pr-filter.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: PR Filter
2+
3+
on:
4+
pull_request_target:
5+
types: [opened, reopened]
6+
7+
jobs:
8+
check-template:
9+
if: github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
10+
runs-on: ubuntu-latest
11+
permissions:
12+
pull-requests: write
13+
14+
steps:
15+
- name: Checkout Code
16+
uses: actions/checkout@v4
17+
18+
- name: Check PR Content
19+
id: intercept
20+
uses: actions/github-script@v7
21+
with:
22+
github-token: ${{ secrets.GITHUB_TOKEN }}
23+
script: |
24+
const script = require('.github/workflows/scripts/pr-filter.js');
25+
await script({ github, context, core });

.github/workflows/publish.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
required: true
1111
BUILDER:
1212
required: true
13+
workflow_dispatch:
1314

1415
jobs:
1516
launch:
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
function hasTypes(markdown) {
2+
return /## Type of change/.test(markdown) && /-\s\[x\]/i.test(markdown);
3+
}
4+
5+
function hasDescription(markdown) {
6+
return (
7+
/## Description/.test(markdown) &&
8+
!/## Description\s*\n\s*(##|\s*$)/.test(markdown)
9+
);
10+
}
11+
12+
module.exports = async ({ github, context, core }) => {
13+
const pr = context.payload.pull_request;
14+
const body = pr.body === null ? '' : pr.body;
15+
const markdown = body.replace(/<!--[\s\S]*?-->/g, '');
16+
const action = context.payload.action;
17+
18+
const isValid =
19+
markdown !== '' && hasTypes(markdown) && hasDescription(markdown);
20+
21+
if (!isValid) {
22+
await github.rest.pulls.update({
23+
...context.repo,
24+
pull_number: pr.number,
25+
state: 'closed'
26+
});
27+
28+
await github.rest.issues.createComment({
29+
...context.repo,
30+
issue_number: pr.number,
31+
body: `Oops, it seems you've ${action} an invalid pull request. No worries, we'll close it for you.`
32+
});
33+
34+
core.setFailed('PR content does not meet template requirements.');
35+
}
36+
};

.github/workflows/stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ permissions:
99
pull-requests: write
1010

1111
env:
12-
STALE_LABEL: stale
12+
STALE_LABEL: inactive
1313
EXEMPT_LABELS: "pending,planning,in progress"
1414
MESSAGE: >
1515
This conversation has been automatically marked as stale because it has not had recent activity.

.github/workflows/style-lint.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ package-lock.json
2323
!.vscode/tasks.json
2424

2525
# Misc
26-
_sass/dist
26+
_sass/vendors
2727
assets/js/dist

.stylelintrc.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"ignoreFiles": ["_sass/vendors/**"],
3+
"extends": "stylelint-config-standard-scss",
4+
"rules": {
5+
"no-descending-specificity": null,
6+
"shorthand-property-no-redundant-values": null,
7+
"at-rule-no-vendor-prefix": null,
8+
"property-no-vendor-prefix": null,
9+
"selector-no-vendor-prefix": null,
10+
"value-no-vendor-prefix": null,
11+
"color-function-notation": "legacy",
12+
"alpha-value-notation": "number",
13+
"selector-not-notation": "simple",
14+
"color-hex-length": "long",
15+
"declaration-block-single-line-max-declarations": 3,
16+
"scss/operator-no-newline-after": null,
17+
"rule-empty-line-before": [
18+
"always",
19+
{
20+
"ignore": ["after-comment", "first-nested"]
21+
}
22+
],
23+
"value-keyword-case": [
24+
"lower",
25+
{
26+
"ignoreProperties": ["/^\\$/"]
27+
}
28+
],
29+
"media-feature-range-notation": "prefix"
30+
}
31+
}

0 commit comments

Comments
 (0)