Skip to content

Commit 9e015c7

Browse files
feat: lint workflow files and others files in .github (#16914)
* add npm prettier dep and format script to .github folder * initial work on prettier formatting test * attempt index notation * change name of .github job to be valid * another use of index notation this is getting overcomplicated * Change job ID to `github-files-formatting` and chane the name to `.github Files Checks` * Change job name to `.github Files Formatting` * Update Makefile with .github module and `filter-out`s * run prettier formatting as added in this PR
1 parent df8ba21 commit 9e015c7

17 files changed

+173
-108
lines changed

.github/.nvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
22.14.0

.github/DISCUSSION_TEMPLATE/feature-request.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
title: "[Feature] feature-name-goes-here"
2-
labels: ["feature"]
1+
title: '[Feature] feature-name-goes-here'
2+
labels: ['feature']
33

44
body:
55
- type: markdown
@@ -13,7 +13,7 @@ body:
1313
attributes:
1414
label: I have searched the existing feature requests, both open and closed, to make sure this is not a duplicate request.
1515
options:
16-
- label: "Yes"
16+
- label: 'Yes'
1717
required: true
1818

1919
- type: textarea

.github/ISSUE_TEMPLATE/bug_report.yaml

+5-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ body:
55
attributes:
66
label: I have searched the existing issues, both open and closed, to make sure this is not a duplicate report.
77
options:
8-
- label: "Yes"
8+
- label: 'Yes'
99
required: true
1010

1111
- type: markdown
@@ -84,7 +84,7 @@ body:
8484
id: repro
8585
attributes:
8686
label: Reproduction steps
87-
description: "How do you trigger this bug? Please walk us through it step by step."
87+
description: 'How do you trigger this bug? Please walk us through it step by step.'
8888
value: |
8989
1.
9090
2.
@@ -97,12 +97,13 @@ body:
9797
id: logs
9898
attributes:
9999
label: Relevant log output
100-
description: Please copy and paste any relevant logs below. (code formatting is
100+
description:
101+
Please copy and paste any relevant logs below. (code formatting is
101102
enabled, no need for backticks)
102103
render: shell
103104
validations:
104105
required: false
105-
106+
106107
- type: textarea
107108
attributes:
108109
label: Additional information

.github/package-lock.json

+28
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/package.json

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"scripts": {
3+
"format": "prettier --check .",
4+
"format:fix": "prettier --write ."
5+
},
6+
"devDependencies": {
7+
"prettier": "^3.5.3"
8+
}
9+
}

.github/release.yml

+33-33
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
1-
changelog:
2-
categories:
3-
- title: 🚨 Breaking Changes
4-
labels:
5-
- changelog:breaking-change
6-
7-
- title: 🫥 Deprecated Changes
8-
labels:
9-
- changelog:deprecated
10-
11-
- title: 🔒 Security
12-
labels:
13-
- changelog:security
14-
15-
- title: 🚀 Features
16-
labels:
17-
- changelog:feature
18-
19-
- title: 🌟 Enhancements
20-
labels:
21-
- changelog:enhancement
22-
23-
- title: 🐛 Bug fixes
24-
labels:
25-
- changelog:bugfix
26-
27-
- title: 📚 Documentation
28-
labels:
29-
- changelog:documentation
30-
31-
- title: 🌐 Translations
32-
labels:
33-
- changelog:translation
1+
changelog:
2+
categories:
3+
- title: 🚨 Breaking Changes
4+
labels:
5+
- changelog:breaking-change
6+
7+
- title: 🫥 Deprecated Changes
8+
labels:
9+
- changelog:deprecated
10+
11+
- title: 🔒 Security
12+
labels:
13+
- changelog:security
14+
15+
- title: 🚀 Features
16+
labels:
17+
- changelog:feature
18+
19+
- title: 🌟 Enhancements
20+
labels:
21+
- changelog:enhancement
22+
23+
- title: 🐛 Bug fixes
24+
labels:
25+
- changelog:bugfix
26+
27+
- title: 📚 Documentation
28+
labels:
29+
- changelog:documentation
30+
31+
- title: 🌐 Translations
32+
labels:
33+
- changelog:translation

.github/workflows/codeql-analysis.yml

+31-32
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
# the `language` matrix defined below to confirm you have the correct set of
1010
# supported CodeQL languages.
1111
#
12-
name: "CodeQL"
12+
name: 'CodeQL'
1313

1414
on:
1515
push:
16-
branches: [ "main" ]
16+
branches: ['main']
1717
pull_request:
1818
# The branches below must be a subset of the branches above
19-
branches: [ "main" ]
19+
branches: ['main']
2020
schedule:
2121
- cron: '20 13 * * 1'
2222

@@ -36,43 +36,42 @@ jobs:
3636
strategy:
3737
fail-fast: false
3838
matrix:
39-
language: [ 'javascript', 'python' ]
39+
language: ['javascript', 'python']
4040
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
4141
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
4242

4343
steps:
44-
- name: Checkout repository
45-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
44+
- name: Checkout repository
45+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
4646

47-
# Initializes the CodeQL tools for scanning.
48-
- name: Initialize CodeQL
49-
uses: github/codeql-action/init@5f8171a638ada777af81d42b55959a643bb29017 # v3
50-
with:
51-
languages: ${{ matrix.language }}
52-
# If you wish to specify custom queries, you can do so here or in a config file.
53-
# By default, queries listed here will override any specified in a config file.
54-
# Prefix the list here with "+" to use these queries and those in the config file.
47+
# Initializes the CodeQL tools for scanning.
48+
- name: Initialize CodeQL
49+
uses: github/codeql-action/init@5f8171a638ada777af81d42b55959a643bb29017 # v3
50+
with:
51+
languages: ${{ matrix.language }}
52+
# If you wish to specify custom queries, you can do so here or in a config file.
53+
# By default, queries listed here will override any specified in a config file.
54+
# Prefix the list here with "+" to use these queries and those in the config file.
5555

56-
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
57-
# queries: security-extended,security-and-quality
56+
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
57+
# queries: security-extended,security-and-quality
5858

59+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
60+
# If this step fails, then you should remove it and run the build manually (see below)
61+
- name: Autobuild
62+
uses: github/codeql-action/autobuild@5f8171a638ada777af81d42b55959a643bb29017 # v3
5963

60-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
61-
# If this step fails, then you should remove it and run the build manually (see below)
62-
- name: Autobuild
63-
uses: github/codeql-action/autobuild@5f8171a638ada777af81d42b55959a643bb29017 # v3
64+
# ℹ️ Command-line programs to run using the OS shell.
65+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
6466

65-
# ℹ️ Command-line programs to run using the OS shell.
66-
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
67+
# If the Autobuild fails above, remove it and uncomment the following three lines.
68+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
6769

68-
# If the Autobuild fails above, remove it and uncomment the following three lines.
69-
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
70+
# - run: |
71+
# echo "Run, Build Application using script"
72+
# ./location_of_script_within_repo/buildscript.sh
7073

71-
# - run: |
72-
# echo "Run, Build Application using script"
73-
# ./location_of_script_within_repo/buildscript.sh
74-
75-
- name: Perform CodeQL Analysis
76-
uses: github/codeql-action/analyze@5f8171a638ada777af81d42b55959a643bb29017 # v3
77-
with:
78-
category: "/language:${{matrix.language}}"
74+
- name: Perform CodeQL Analysis
75+
uses: github/codeql-action/analyze@5f8171a638ada777af81d42b55959a643bb29017 # v3
76+
with:
77+
category: '/language:${{matrix.language}}'

.github/workflows/docs-deploy.yml

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Docs deploy
22
on:
33
workflow_run:
4-
workflows: ["Docs build"]
4+
workflows: ['Docs build']
55
types:
66
- completed
77

@@ -140,10 +140,10 @@ jobs:
140140
TF_STATE_POSTGRES_CONN_STR: ${{ secrets.TF_STATE_POSTGRES_CONN_STR }}
141141
uses: gruntwork-io/terragrunt-action@9559e51d05873b0ea467c42bbabcb5c067642ccc # v2
142142
with:
143-
tg_version: "0.58.12"
144-
tofu_version: "1.7.1"
145-
tg_dir: "deployment/modules/cloudflare/docs"
146-
tg_command: "apply"
143+
tg_version: '0.58.12'
144+
tofu_version: '1.7.1'
145+
tg_dir: 'deployment/modules/cloudflare/docs'
146+
tg_command: 'apply'
147147

148148
- name: Deploy Docs Subdomain Output
149149
id: docs-output
@@ -155,10 +155,10 @@ jobs:
155155
TF_STATE_POSTGRES_CONN_STR: ${{ secrets.TF_STATE_POSTGRES_CONN_STR }}
156156
uses: gruntwork-io/terragrunt-action@9559e51d05873b0ea467c42bbabcb5c067642ccc # v2
157157
with:
158-
tg_version: "0.58.12"
159-
tofu_version: "1.7.1"
160-
tg_dir: "deployment/modules/cloudflare/docs"
161-
tg_command: "output -json"
158+
tg_version: '0.58.12'
159+
tofu_version: '1.7.1'
160+
tg_dir: 'deployment/modules/cloudflare/docs'
161+
tg_command: 'output -json'
162162

163163
- name: Output Cleaning
164164
id: clean
@@ -172,8 +172,8 @@ jobs:
172172
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN_PAGES_UPLOAD }}
173173
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
174174
projectName: ${{ fromJson(steps.clean.outputs.output).pages_project_name.value }}
175-
workingDirectory: "docs"
176-
directory: "build"
175+
workingDirectory: 'docs'
176+
directory: 'build'
177177
branch: ${{ steps.parameters.outputs.name }}
178178
wranglerVersion: '3'
179179

.github/workflows/docs-destroy.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@ jobs:
1313

1414
- name: Destroy Docs Subdomain
1515
env:
16-
TF_VAR_prefix_name: "pr-${{ github.event.number }}"
17-
TF_VAR_prefix_event_type: "pr"
16+
TF_VAR_prefix_name: 'pr-${{ github.event.number }}'
17+
TF_VAR_prefix_event_type: 'pr'
1818
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
1919
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
2020
TF_STATE_POSTGRES_CONN_STR: ${{ secrets.TF_STATE_POSTGRES_CONN_STR }}
2121
uses: gruntwork-io/terragrunt-action@9559e51d05873b0ea467c42bbabcb5c067642ccc # v2
2222
with:
23-
tg_version: "0.58.12"
24-
tofu_version: "1.7.1"
25-
tg_dir: "deployment/modules/cloudflare/docs"
26-
tg_command: "destroy -refresh=false"
23+
tg_version: '0.58.12'
24+
tofu_version: '1.7.1'
25+
tg_dir: 'deployment/modules/cloudflare/docs'
26+
tg_command: 'destroy -refresh=false'
2727

2828
- name: Comment
2929
uses: actions-cool/maintain-one-comment@4b2dbf086015f892dcb5e8c1106f5fccd6c1476b # v3

.github/workflows/fix-format.yml

-1
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,3 @@ jobs:
4949
repo: context.repo.repo,
5050
name: 'fix:formatting'
5151
})
52-

.github/workflows/pr-label-validation.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ jobs:
1717
mode: exactly
1818
count: 1
1919
use_regex: true
20-
labels: "changelog:.*"
20+
labels: 'changelog:.*'
2121
add_comment: true
22-
message: "Label error. Requires {{errorString}} {{count}} of: {{ provided }}. Found: {{ applied }}. A maintainer will add the required label."
22+
message: 'Label error. Requires {{errorString}} {{count}} of: {{ provided }}. Found: {{ applied }}. A maintainer will add the required label.'

.github/workflows/pr-labeler.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
name: "Pull Request Labeler"
1+
name: 'Pull Request Labeler'
22
on:
3-
- pull_request_target
3+
- pull_request_target
44

55
jobs:
66
labeler:
@@ -9,4 +9,4 @@ jobs:
99
pull-requests: write
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5
12+
- uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5

.github/workflows/pr-require-conventional-commit.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: PR Conventional Commit Validation
12-
uses: ytanikin/[email protected]
12+
uses: ytanikin/[email protected]
1313
with:
1414
task_types: '["feat","fix","docs","test","ci","refactor","perf","chore","revert"]'
1515
add_label: 'false'

.github/workflows/preview-label.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ jobs:
1313
steps:
1414
- uses: mshick/add-pr-comment@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2
1515
with:
16-
message-id: "preview-status"
17-
message: "Deploying preview environment to https://pr-${{ github.event.pull_request.number }}.preview.internal.immich.cloud/"
16+
message-id: 'preview-status'
17+
message: 'Deploying preview environment to https://pr-${{ github.event.pull_request.number }}.preview.internal.immich.cloud/'
1818

1919
remove-label:
2020
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)