Skip to content

Commit

Permalink
Merge pull request #51 from jellyfin/10.8
Browse files Browse the repository at this point in the history
  • Loading branch information
crobibero authored Nov 6, 2021
2 parents 709a3c3 + c37ac72 commit 621f03f
Show file tree
Hide file tree
Showing 8 changed files with 83 additions and 11 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/build-dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
dotnet-version: 6.0.x
include-prerelease: true

- name: Build Jellyfin Plugin
uses: oddstr13/[email protected]
id: jprm
with:
dotnet-target: net6.0

- name: Upload Artifact
uses: actions/upload-artifact@v2
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
dotnet-version: 6.0.x
include-prerelease: true

- name: Initialize CodeQL
uses: github/codeql-action/init@v1
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/command-dispatch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Allows for the definition of PR and Issue /commands
name: Slash Command Dispatcher

on:
issue_comment:
types:
- created

jobs:
launcher:
runs-on: ubuntu-latest
steps:
- name: Command Dispatch
uses: peter-evans/slash-command-dispatch@v2
with:
token: ${{ secrets.JF_BOT_TOKEN }}
permission: write
issue-type: pull-request
commands: |-
rebase
update-prep
34 changes: 34 additions & 0 deletions .github/workflows/command-rebase.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: PR Rebase Command

on:
repository_dispatch:
types:
- rebase-command

jobs:
rebase:
runs-on: ubuntu-latest
steps:
- name: Rebase PR
uses: peter-evans/rebase@v1
id: rebase
with:
head: ${{ github.event.client_payload.pull_request.head.label }}

- name: Add Success Reaction
if: ${{ steps.rebase.outputs.rebased-count == 1 }}
uses: peter-evans/create-or-update-comment@v1
with:
token: ${{ secrets.JF_BOT_TOKEN }}
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
reaction-type: hooray

- name: Add Failure Reaction
if: ${{ steps.rebase.outputs.rebased-count == 0 || failure() }}
uses: peter-evans/create-or-update-comment@v1
with:
token: ${{ secrets.JF_BOT_TOKEN }}
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
reaction-type: confused, -1
3 changes: 2 additions & 1 deletion .github/workflows/test-dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
dotnet-version: 6.0.x
include-prerelease: true

- name: Install dependencies
run: dotnet restore
Expand Down
22 changes: 17 additions & 5 deletions .github/workflows/update-release-draft.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
# Automates creation of Release Drafts using Release Drafter
name: Update Release Draft
name: Update Release Draft & Create Release Bump PR

on:
push:
branches:
- master
paths-ignore:
- build.yaml
workflow_dispatch:
repository_dispatch:
types:
- update-prep-command

jobs:
update_release_draft:
Expand All @@ -23,9 +28,9 @@ jobs:
- name: Setup YQ
uses: chrisdickinson/setup-yq@latest
with:
yq-version: v4.9.6
yq-version: v4.12.2

- name: Parse changelog
- name: Set-up Environment
run: |
TAG="${{ steps.draft.outputs.tag_name }}"
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
Expand All @@ -41,16 +46,22 @@ jobs:
cat cl.md >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
echo "HAS_CHANGES=$(grep -qie 'No changes$' cl.md && echo false || echo true)" >> $GITHUB_ENV
rm cl.md
- name: Checkout repository
echo "ABI_VERSION=$(curl -s https://api.jellyfin.org/openapi/jellyfin-openapi-stable.json | jq -r '.info.version').0" >> $GITHUB_ENV
- name: Checkout Repository
if: ${{ env.HAS_CHANGES == 'true' }}
uses: actions/checkout@v2

- name: Update build.yaml
if: ${{ env.HAS_CHANGES == 'true' }}
run: |
yq eval '.version = env(VERSION) | .changelog = strenv(CHANGELOG) | .changelog style="literal"' -i build.yaml
yq eval '.version = env(VERSION) | .targetAbi = env(ABI_VERSION) | .changelog = strenv(CHANGELOG) | .changelog style="literal"' -i build.yaml
- name: Commit Changes
if: ${{ env.HAS_CHANGES == 'true' }}
run: |
git config user.name "jellyfin-bot"
git config user.email "[email protected]"
Expand All @@ -59,6 +70,7 @@ jobs:
git push -f origin prepare-${{ env.VERSION }}
- name: Create or Update PR
if: ${{ env.HAS_CHANGES == 'true' }}
uses: k3rnels-actions/pr-update@v1
with:
token: ${{ secrets.JF_BOT_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion Jellyfin.Plugin.Reports/Api/ReportsService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ private async Task<ReportResult> GetReportActivities(IReportsDownload request)
{
var activityLogQuery = new ActivityLogQuery
{
StartIndex = request.StartIndex,
Skip = request.StartIndex,
Limit = request.HasQueryLimit ? request.Limit : null
};

Expand Down
4 changes: 2 additions & 2 deletions Jellyfin.Plugin.Reports/Jellyfin.Plugin.Reports.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<AssemblyVersion>12.0.0.0</AssemblyVersion>
<FileVersion>12.0.0.0</FileVersion>
<RootNamespace>Jellyfin.Plugin.Reports</RootNamespace>
Expand All @@ -17,7 +17,7 @@
<ItemGroup>
<PackageReference Include="Jellyfin.Data" Version="10.*-*" />
<PackageReference Include="Jellyfin.Controller" Version="10.*-*" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.2.0" />
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>

</Project>

0 comments on commit 621f03f

Please sign in to comment.