aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiels van Velzen <nielsvanvelzen@users.noreply.github.com>2026-01-05 17:22:50 +0100
committerGitHub <noreply@github.com>2026-01-05 17:22:50 +0100
commita1e0e4fd9df39838db433fac72aa90d71b66fb80 (patch)
treed280178e4e82a81eecc0203e8f55be86ab33ea23
parent4138214ac326618635248b6f84b5338166b68b1d (diff)
parent8a1129bbdec24f60b011ae1f90bb0c41b989d378 (diff)
Merge pull request #15888 from Shadowghost/fix-api-diffHEADmaster
Fix API diff workflow
-rw-r--r--.github/workflows/ci-codeql-analysis.yml3
-rw-r--r--.github/workflows/ci-openapi.yml77
-rw-r--r--.github/workflows/commands.yml3
-rw-r--r--.github/workflows/issue-template-check.yml3
-rw-r--r--.github/workflows/project-automation.yml1
5 files changed, 29 insertions, 58 deletions
diff --git a/.github/workflows/ci-codeql-analysis.yml b/.github/workflows/ci-codeql-analysis.yml
index 5ca3edd7b..6d4f4edb6 100644
--- a/.github/workflows/ci-codeql-analysis.yml
+++ b/.github/workflows/ci-codeql-analysis.yml
@@ -21,6 +21,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
+
- name: Setup .NET
uses: actions/setup-dotnet@2016bd2012dba4e32de620c46fe006a3ac9f0602 # v5.0.1
with:
@@ -31,7 +32,9 @@ jobs:
with:
languages: ${{ matrix.language }}
queries: +security-extended
+
- name: Autobuild
uses: github/codeql-action/autobuild@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v4.31.9
+
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v4.31.9
diff --git a/.github/workflows/ci-openapi.yml b/.github/workflows/ci-openapi.yml
index 46af68e58..8406d1d2d 100644
--- a/.github/workflows/ci-openapi.yml
+++ b/.github/workflows/ci-openapi.yml
@@ -20,12 +20,15 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
+
- name: Setup .NET
uses: actions/setup-dotnet@2016bd2012dba4e32de620c46fe006a3ac9f0602 # v5.0.1
with:
dotnet-version: '9.0.x'
+
- name: Generate openapi.json
run: dotnet test tests/Jellyfin.Server.Integration.Tests/Jellyfin.Server.Integration.Tests.csproj -c Release --filter "Jellyfin.Server.Integration.Tests.OpenApiSpecTests"
+
- name: Upload openapi.json
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
@@ -46,6 +49,7 @@ jobs:
ref: ${{ github.event.pull_request.head.sha }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
fetch-depth: 0
+
- name: Checkout common ancestor
env:
HEAD_REF: ${{ github.head_ref }}
@@ -54,12 +58,15 @@ jobs:
git -c protocol.version=2 fetch --prune --progress --no-recurse-submodules upstream +refs/heads/*:refs/remotes/upstream/* +refs/tags/*:refs/tags/*
ANCESTOR_REF=$(git merge-base upstream/${{ github.base_ref }} origin/$HEAD_REF)
git checkout --progress --force $ANCESTOR_REF
+
- name: Setup .NET
uses: actions/setup-dotnet@2016bd2012dba4e32de620c46fe006a3ac9f0602 # v5.0.1
with:
dotnet-version: '9.0.x'
+
- name: Generate openapi.json
run: dotnet test tests/Jellyfin.Server.Integration.Tests/Jellyfin.Server.Integration.Tests.csproj -c Release --filter "Jellyfin.Server.Integration.Tests.OpenApiSpecTests"
+
- name: Upload openapi.json
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
@@ -70,7 +77,7 @@ jobs:
openapi-diff:
permissions:
- pull-requests: write # to create or update comment (peter-evans/create-or-update-comment)
+ pull-requests: write
name: OpenAPI - Difference
if: ${{ github.event_name == 'pull_request_target' }}
@@ -84,67 +91,23 @@ jobs:
with:
name: openapi-head
path: openapi-head
+
- name: Download openapi-base
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: openapi-base
path: openapi-base
- - name: Workaround openapi-diff issue
- run: |
- sed -i 's/"allOf"/"oneOf"/g' openapi-head/openapi.json
- sed -i 's/"allOf"/"oneOf"/g' openapi-base/openapi.json
- - name: Calculate OpenAPI difference
- uses: docker://openapitools/openapi-diff
- continue-on-error: true
- with:
- args: --fail-on-changed --markdown openapi-changes.md openapi-base/openapi.json openapi-head/openapi.json
- - id: read-diff
- name: Read openapi-diff output
- run: |
- # Read and fix markdown
- body=$(cat openapi-changes.md)
- # Write to workflow summary
- echo "$body" >> $GITHUB_STEP_SUMMARY
- # Set ApiChanged var
- if [ "$body" != '' ]; then
- echo "ApiChanged=1" >> "$GITHUB_OUTPUT"
- else
- echo "ApiChanged=0" >> "$GITHUB_OUTPUT"
- fi
- # Add header/footer for diff comment
- echo '<!--openapi-diff-workflow-comment-->' > openapi-changes-reply.md
- echo "<details>" >> openapi-changes-reply.md
- echo "<summary>Changes in OpenAPI specification found. Expand to see details.</summary>" >> openapi-changes-reply.md
- echo "" >> openapi-changes-reply.md
- echo "$body" >> openapi-changes-reply.md
- echo "" >> openapi-changes-reply.md
- echo "</details>" >> openapi-changes-reply.md
- - name: Find difference comment
- uses: peter-evans/find-comment@b30e6a3c0ed37e7c023ccd3f1db5c6c0b0c23aad # v4.0.0
- id: find-comment
- with:
- issue-number: ${{ github.event.pull_request.number }}
- direction: last
- body-includes: openapi-diff-workflow-comment
- - name: Reply or edit difference comment (changed)
- uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0
- if: ${{ steps.read-diff.outputs.ApiChanged == '1' }}
- with:
- issue-number: ${{ github.event.pull_request.number }}
- comment-id: ${{ steps.find-comment.outputs.comment-id }}
- edit-mode: replace
- body-path: openapi-changes-reply.md
- - name: Edit difference comment (unchanged)
- uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0
- if: ${{ steps.read-diff.outputs.ApiChanged == '0' && steps.find-comment.outputs.comment-id != '' }}
- with:
- issue-number: ${{ github.event.pull_request.number }}
- comment-id: ${{ steps.find-comment.outputs.comment-id }}
- edit-mode: replace
- body: |
- <!--openapi-diff-workflow-comment-->
- No changes to OpenAPI specification found. See history of this comment for previous changes.
+ - name: Detect OpenAPI changes
+ id: openapi-diff
+ uses: jellyfin/openapi-diff-action@9274f6bda9d01ab091942a4a8334baa53692e8a4 # v1.0.0
+ with:
+ old-spec: openapi-base/openapi.json
+ new-spec: openapi-head/openapi.json
+ markdown: openapi-changelog.md
+ add-pr-comment: true
+ github-token: ${{ secrets.GITHUB_TOKEN }}
+
publish-unstable:
name: OpenAPI - Publish Unstable Spec
@@ -178,7 +141,6 @@ jobs:
username: "${{ secrets.REPO_USER }}"
key: "${{ secrets.REPO_KEY }}"
debug: false
- script_stop: false
script: |
if ! test -d /run/workflows; then
sudo mkdir -p /run/workflows
@@ -240,7 +202,6 @@ jobs:
username: "${{ secrets.REPO_USER }}"
key: "${{ secrets.REPO_KEY }}"
debug: false
- script_stop: false
script: |
if ! test -d /run/workflows; then
sudo mkdir -p /run/workflows
diff --git a/.github/workflows/commands.yml b/.github/workflows/commands.yml
index 0d3e09d1a..a70ec00ee 100644
--- a/.github/workflows/commands.yml
+++ b/.github/workflows/commands.yml
@@ -43,13 +43,16 @@ jobs:
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
repository: jellyfin/jellyfin-triage-script
+
- name: install python
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
python-version: '3.14'
cache: 'pip'
+
- name: install python packages
run: pip install -r rename/requirements.txt
+
- name: run rename script
run: python3 rename.py
working-directory: ./rename
diff --git a/.github/workflows/issue-template-check.yml b/.github/workflows/issue-template-check.yml
index 8be48b5c3..53a66e013 100644
--- a/.github/workflows/issue-template-check.yml
+++ b/.github/workflows/issue-template-check.yml
@@ -13,13 +13,16 @@ jobs:
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
repository: jellyfin/jellyfin-triage-script
+
- name: install python
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
python-version: '3.14'
cache: 'pip'
+
- name: install python packages
run: pip install -r main-repo-triage/requirements.txt
+
- name: check and comment issue
working-directory: ./main-repo-triage
run: python3 single_issue_gha.py
diff --git a/.github/workflows/project-automation.yml b/.github/workflows/project-automation.yml
index d62f655b3..7b29d3c81 100644
--- a/.github/workflows/project-automation.yml
+++ b/.github/workflows/project-automation.yml
@@ -21,6 +21,7 @@ jobs:
with:
project: Current Release
action: delete
+ column: In progress
repo-token: ${{ secrets.JF_BOT_TOKEN }}
- name: Add to 'Release Next' project