Skip to content

Commit 5351ed9

Browse files
authored
Merge branch 'master' into reset-metadata
2 parents 9c1dd2e + 32354b3 commit 5351ed9

File tree

274 files changed

+12164
-7597
lines changed

Some content is hidden

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

274 files changed

+12164
-7597
lines changed

.eslintrc.js

+2
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ module.exports = {
7979
'operator-linebreak': ['error', 'before', { overrides: { '?': 'after', ':': 'after', '=': 'after' } }],
8080
'padded-blocks': ['error', 'never'],
8181
'prefer-const': ['error', { 'destructuring': 'all' }],
82+
'prefer-promise-reject-errors': ['warn', { 'allowEmptyReject': true }],
8283
'@typescript-eslint/prefer-for-of': ['error'],
8384
'@typescript-eslint/prefer-optional-chain': ['error'],
8485
'quotes': ['error', 'single', { 'avoidEscape': true, 'allowTemplateLiterals': false }],
@@ -263,6 +264,7 @@ module.exports = {
263264
'UserParentalControlPage': 'writable',
264265
'Windows': 'readonly',
265266
// Build time definitions
267+
__COMMIT_SHA__: 'readonly',
266268
__JF_BUILD_VERSION__: 'readonly',
267269
__PACKAGE_JSON_NAME__: 'readonly',
268270
__PACKAGE_JSON_VERSION__: 'readonly',

.github/workflows/automation.yml

+8-6
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
1-
name: 'Automation'
1+
name: Automation
2+
3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
5+
cancel-in-progress: true
26

37
on:
48
push:
59
branches:
610
- master
711
pull_request_target:
8-
types:
9-
- synchronize
1012

1113
jobs:
12-
triage:
13-
name: 'Merge conflict labeling'
14+
conflicts:
15+
name: Merge conflict labeling
1416
runs-on: ubuntu-latest
1517
if: ${{ github.repository == 'jellyfin/jellyfin-web' }}
1618
steps:
17-
- uses: eps1lon/actions-label-merge-conflict@6d74047dcef155976a15e4a124dde2c7fe0c5522 # v3.0.1
19+
- uses: eps1lon/actions-label-merge-conflict@1b1b1fcde06a9b3d089f3464c96417961dde1168 # v3.0.2
1820
with:
1921
dirtyLabel: 'merge conflict'
2022
commentOnDirty: 'This pull request has merge conflicts. Please resolve the conflicts so the PR can be successfully reviewed and merged.'

.github/workflows/build.yml

+79-25
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ concurrency:
77
on:
88
push:
99
branches: [ master, release* ]
10-
pull_request:
10+
pull_request_target:
1111
branches: [ master, release* ]
1212
workflow_dispatch:
1313

@@ -18,10 +18,12 @@ jobs:
1818

1919
steps:
2020
- name: Check out Git repository
21-
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
21+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
22+
with:
23+
ref: ${{ github.event.pull_request.head.sha || github.sha }}
2224

2325
- name: Setup node environment
24-
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
26+
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
2527
with:
2628
node-version: 20
2729
check-latest: true
@@ -41,35 +43,87 @@ jobs:
4143
mv dist/config.tmp.json dist/config.json
4244
4345
- name: Upload artifact
44-
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
46+
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
4547
with:
4648
name: jellyfin-web__prod
47-
path: |
48-
dist
49+
path: dist
4950

50-
pr_context:
51-
name: Save PR context as artifact
52-
if: ${{ always() && !cancelled() && github.event_name == 'pull_request' }}
51+
publish:
52+
name: Deploy to Cloudflare Pages
5353
runs-on: ubuntu-latest
54+
if: ${{ github.repository == 'jellyfin/jellyfin-web' }}
5455
needs:
5556
- run-build-prod
57+
permissions:
58+
contents: read
59+
deployments: write
5660

5761
steps:
58-
- name: Save PR context
59-
env:
60-
PR_BRANCH: ${{ github.ref_name }}
61-
PR_NUMBER: ${{ github.event.number }}
62-
PR_SHA: ${{ github.event.pull_request.head.sha }}
63-
run: |
64-
echo $PR_BRANCH > PR_branch
65-
echo $PR_NUMBER > PR_number
66-
echo $PR_SHA > PR_sha
62+
- name: Add comment
63+
uses: thollander/actions-comment-pull-request@fabd468d3a1a0b97feee5f6b9e499eab0dd903f6 # v2.5.0
64+
if: ${{ github.event_name == 'pull_request_target' }}
65+
with:
66+
GITHUB_TOKEN: ${{ secrets.JF_BOT_TOKEN }}
67+
message: |
68+
## Cloudflare Pages deployment
69+
70+
| **Latest commit** | <code>${{ github.event.pull_request.head.sha || github.sha }}</code> |
71+
|-------------------|:-:|
72+
| **Status** | 🔄 Deploying... |
73+
| **Preview URL** | Not available |
74+
| **Type** | 🔀 Preview |
75+
pr_number: ${{ github.event.pull_request.number }}
76+
comment_tag: CFPages-deployment
77+
mode: recreate
78+
79+
- name: Download workflow artifact
80+
uses: dawidd6/action-download-artifact@09f2f74827fd3a8607589e5ad7f9398816f540fe # v3.1.4
81+
with:
82+
name: jellyfin-web__prod
83+
path: dist
84+
85+
- name: Publish to Cloudflare
86+
id: cf
87+
uses: cloudflare/wrangler-action@f84a562284fc78278ff9052435d9526f9c718361 # v3.7.0
88+
with:
89+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
90+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
91+
command: pages deploy dist --project-name=jellyfin-web --branch=${{
92+
(github.event_name != 'pull_request_target' || github.event.pull_request.head.repo.full_name == github.repository)
93+
&& (github.event.pull_request.head.ref || github.ref_name)
94+
|| format('{0}/{1}', github.event.pull_request.head.repo.full_name, github.event.pull_request.head.ref)
95+
}} --commit-hash=${{ github.event.pull_request.head.sha || github.sha }}
6796

68-
- name: Upload PR number as artifact
69-
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
97+
- name: Update status comment (Success)
98+
if: ${{ github.event_name == 'pull_request_target' && success() }}
99+
uses: thollander/actions-comment-pull-request@fabd468d3a1a0b97feee5f6b9e499eab0dd903f6 # v2.5.0
70100
with:
71-
name: PR_context
72-
path: |
73-
PR_branch
74-
PR_number
75-
PR_sha
101+
GITHUB_TOKEN: ${{ secrets.JF_BOT_TOKEN }}
102+
message: |
103+
## Cloudflare Pages deployment
104+
105+
| **Latest commit** | <code>${{ github.event.pull_request.head.sha || github.sha }}</code> |
106+
|-------------------|:-:|
107+
| **Status** | ✅ Deployed! |
108+
| **Preview URL** | ${{ steps.cf.outputs.deployment-url != '' && steps.cf.outputs.deployment-url || 'Not available' }} |
109+
| **Type** | 🔀 Preview |
110+
pr_number: ${{ github.event.pull_request.number }}
111+
comment_tag: CFPages-deployment
112+
mode: recreate
113+
114+
- name: Update status comment (Failure)
115+
if: ${{ github.event_name == 'pull_request_target' && failure() }}
116+
uses: thollander/actions-comment-pull-request@fabd468d3a1a0b97feee5f6b9e499eab0dd903f6 # v2.5.0
117+
with:
118+
GITHUB_TOKEN: ${{ secrets.JF_BOT_TOKEN }}
119+
message: |
120+
## Cloudflare Pages deployment
121+
122+
| **Latest commit** | <code>${{ github.event.pull_request.head.sha || github.sha }}</code> |
123+
|-------------------|:-:|
124+
| **Status** | ❌ Failure. Check workflow logs for details |
125+
| **Preview URL** | Not available |
126+
| **Type** | 🔀 Preview |
127+
pr_number: ${{ github.event.pull_request.number }}
128+
comment_tag: CFPages-deployment
129+
mode: recreate

.github/workflows/codeql.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@ jobs:
1919

2020
steps:
2121
- name: Checkout repository
22-
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
22+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
2323

2424
- name: Initialize CodeQL
25-
uses: github/codeql-action/init@b7cec7526559c32f1616476ff32d17ba4c59b2d6 # v3.25.5
25+
uses: github/codeql-action/init@eb055d739abdc2e8de2e5f4ba1a8b246daa779aa # v3.26.0
2626
with:
2727
languages: javascript
2828
queries: +security-extended
2929

3030
- name: Autobuild
31-
uses: github/codeql-action/autobuild@b7cec7526559c32f1616476ff32d17ba4c59b2d6 # v3.25.5
31+
uses: github/codeql-action/autobuild@eb055d739abdc2e8de2e5f4ba1a8b246daa779aa # v3.26.0
3232

3333
- name: Perform CodeQL Analysis
34-
uses: github/codeql-action/analyze@b7cec7526559c32f1616476ff32d17ba4c59b2d6 # v3.25.5
34+
uses: github/codeql-action/analyze@eb055d739abdc2e8de2e5f4ba1a8b246daa779aa # v3.26.0

.github/workflows/commands.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
comment-id: ${{ github.event.comment.id }}
1919
reactions: '+1'
2020
- name: Checkout the latest code
21-
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
21+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
2222
with:
2323
token: ${{ secrets.JF_BOT_TOKEN }}
2424
fetch-depth: 0

.github/workflows/job-messages.yml

-65
This file was deleted.

.github/workflows/pr-suggestions.yml

+3-5
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ concurrency:
77
on:
88
pull_request_target:
99
branches: [ master, release* ]
10-
types:
11-
- synchronize
1210

1311
jobs:
1412
run-eslint:
@@ -17,12 +15,12 @@ jobs:
1715

1816
steps:
1917
- name: Check out Git repository
20-
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
18+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
2119
with:
2220
ref: ${{ github.event.pull_request.head.sha }}
2321

2422
- name: Setup node environment
25-
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
23+
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
2624
with:
2725
node-version: 20
2826
check-latest: true
@@ -33,6 +31,6 @@ jobs:
3331

3432
- name: Run eslint
3533
if: ${{ github.repository == 'jellyfin/jellyfin-web' }}
36-
uses: CatChen/eslint-suggestion-action@34e2a6c4193eba18a7a20710b5ae37850fc984c3 # v3.1.5
34+
uses: CatChen/eslint-suggestion-action@bc82950fa97bb3e46d9cca16a8bf2ad3e3c010fc # v4.1.5
3735
with:
3836
github-token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)