Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
147 commits
Select commit Hold shift + click to select a range
bc915c6
feat: Complete Phase 2 - Users, Activity & Library Detail Views
Serph91P Feb 2, 2026
372876c
feat: Add PostgreSQL support and fix sync issues
Serph91P Feb 2, 2026
0688ab9
chore: Update PostgreSQL to version 18 (latest stable)
Serph91P Feb 2, 2026
8aae3d2
fix: Add PostgreSQL support to database migrations
Serph91P Feb 2, 2026
3f97c11
chore: Remove ARM64 build to speed up CI
Serph91P Feb 2, 2026
4b90cdd
refactor: Remove Jellystat service type
Serph91P Feb 2, 2026
5d6371e
feat: Add individual service sync jobs in Jobs tab
Serph91P Feb 2, 2026
b5399f5
fix: Emby sync creates MediaItems and populates watch statistics
Serph91P Feb 2, 2026
4a48042
refactor(sync): Emby now matches existing items by PATH instead of cr…
Serph91P Feb 2, 2026
b5e3476
feat: WebSocket real-time job system + Setup Wizard
Serph91P Feb 22, 2026
54b613f
Merge pull request #11 from Serph91P/feature/websocket-setup-wizard
Serph91P Feb 22, 2026
f90a5f5
fix: resolve all priority 1-5 bugs from DEVELOPMENT_STATUS.md
Serph91P Feb 22, 2026
cdc620e
docs: update DEVELOPMENT_STATUS.md with Session 3 bugfix results
Serph91P Feb 22, 2026
5305b75
Merge pull request #12 from Serph91P/fix/bugfixes-and-ux-improvements
Serph91P Feb 22, 2026
e28f6ea
feat: UX improvements, recharts charts, code-splitting
Serph91P Feb 22, 2026
ba130c9
Merge pull request #13 from Serph91P/feature/ux-improvements-and-charts
Serph91P Feb 22, 2026
753f984
feat: Phase 2 enhancements - ResponsiveTable, filters, dashboard charts
Serph91P Feb 22, 2026
1211864
Merge pull request #14 from Serph91P/feature/phase2-enhancements-and-…
Serph91P Feb 22, 2026
ea6e64c
fix: int32 overflow on position_ticks/runtime_ticks + expand-rows + a…
Serph91P Feb 22, 2026
3afe8ab
Merge pull request #15 from Serph91P/feature/phase2-enhancements-and-…
Serph91P Feb 22, 2026
b060298
docs: fix inconsistencies in DEVELOPMENT_STATUS.md
Serph91P Feb 22, 2026
87627e8
Merge pull request #16 from Serph91P/feature/phase2-enhancements-and-…
Serph91P Feb 22, 2026
0ac7124
fix: movie watch stats + user last seen/watched/client
Serph91P Feb 22, 2026
57581fd
Merge pull request #17 from Serph91P/feature/phase2-enhancements-and-…
Serph91P Feb 22, 2026
11ec7c1
docs: update commit hash to 0ac7124
Serph91P Feb 22, 2026
5e3d7b6
chore: update gitignore
Serph91P Feb 24, 2026
27e02ad
chore: remove unused files
Serph91P Feb 24, 2026
9299edf
security: CORS lockdown and reject weak secret keys
Serph91P Feb 24, 2026
5ce11c9
security: mask API keys, notification secrets, and enforce password c…
Serph91P Feb 24, 2026
a9aac93
security: add security headers middleware, WebSocket auth, CORS, path…
Serph91P Feb 24, 2026
4a77912
security: refresh token rotation and account lockout mechanism
Serph91P Feb 24, 2026
66c3d26
security: trusted proxy config and rate limit improvements
Serph91P Feb 24, 2026
f172be7
security: allowlist system settings and auth for version endpoints
Serph91P Feb 24, 2026
7e31364
security: rate-limit rule endpoints and limit import file size
Serph91P Feb 24, 2026
59d54f5
security: validate staging paths against allowed directories
Serph91P Feb 24, 2026
5e866d6
security: replace datetime.utcnow() with timezone-aware datetime.now(…
Serph91P Feb 24, 2026
c65e220
fix: remove duplicate return statement in base service
Serph91P Feb 24, 2026
f4de05a
security: add account lockout columns to User model
Serph91P Feb 24, 2026
e55ee01
security: add database migration for account lockout columns
Serph91P Feb 24, 2026
e863994
security: add audit log data retention job
Serph91P Feb 24, 2026
69ce66e
security: enforce SECRET_KEY in docker-compose files
Serph91P Feb 24, 2026
bb0ac5b
security: frontend WebSocket auth and refresh token rotation support
Serph91P Feb 24, 2026
82eb4f0
chore: add plan/ to .gitignore
Serph91P Feb 24, 2026
3058956
Merge pull request #19 from Serph91P/feature/security-hardening
Serph91P Feb 24, 2026
1af4f0c
chore: configure dependabot to target develop branch
Serph91P Feb 24, 2026
8bf2af0
chore(deps): bump npm minor dependencies in /frontend
Serph91P Feb 24, 2026
dad5b6c
security: enhance release workflow with permissions and changelog gen…
Serph91P Feb 24, 2026
e939d74
security: enhance request handling with body size limit and message r…
Serph91P Feb 24, 2026
9d9982e
security: add refresh token cleanup job to purge expired and revoked …
Serph91P Feb 24, 2026
36efe97
security: enhance activity API with request limiting and input saniti…
Serph91P Feb 24, 2026
c9d439c
security: update notification routes to require active admin for user…
Serph91P Feb 24, 2026
4dfcd1e
security: require active admin for service connection operations and …
Serph91P Feb 24, 2026
013537f
security: validate outbound URLs in setup wizard service connection e…
Serph91P Feb 24, 2026
601b03f
security: enhance API routes with request validation and rate limiting
Serph91P Feb 24, 2026
9e37856
security: require active admin for system settings and cleanup operat…
Serph91P Feb 24, 2026
6a5659e
security: enhance user API routes with request validation and rate li…
Serph91P Feb 24, 2026
0d8313f
security: add CORS validation to warn against wildcard usage in produ…
Serph91P Feb 24, 2026
2171284
security: implement escape_like function to sanitize user input for d…
Serph91P Feb 24, 2026
de7dc98
security: add Content-Security-Policy header to enhance response secu…
Serph91P Feb 24, 2026
dfbf15e
security: implement SSRF-safe URL validation utility to prevent outbo…
Serph91P Feb 24, 2026
7f810be
security: enforce connection limits per IP in WebSocket manager to pr…
Serph91P Feb 24, 2026
3f378a2
security: enhance notification channel validation and restrict system…
Serph91P Feb 24, 2026
7008ea4
security: enhance client IP extraction to trust forwarded headers fro…
Serph91P Feb 24, 2026
ba273f2
security: add outbound URL validation for Discord, Slack, and generic…
Serph91P Feb 24, 2026
c0914bc
security: migrate JWT storage from localStorage to httpOnly cookies t…
Serph91P Feb 24, 2026
f0eec84
Merge pull request #21 from Serph91P/feature/phase2-enhancements-and-…
Serph91P Feb 24, 2026
9fcdab4
security: enhance authentication flow to prioritize httpOnly cookies …
Serph91P Feb 24, 2026
592dc1b
security: implement httpOnly cookies for authentication tokens and en…
Serph91P Feb 24, 2026
0203cbc
security: restrict job management endpoints to admin users only
Serph91P Feb 24, 2026
8d060ed
security: restrict cleanup rule management to admin users only
Serph91P Feb 24, 2026
53ccff9
security: enhance setup status endpoint to return minimal info withou…
Serph91P Feb 24, 2026
90a8272
security: restrict staging operations to admin users only
Serph91P Feb 24, 2026
989f484
security: enhance health check endpoint to return minimal info withou…
Serph91P Feb 24, 2026
3de8799
security: add WebSocket token creation for short-lived authentication
Serph91P Feb 24, 2026
66f3d2d
security: define SENSITIVE_CONFIG_KEYS as a ClassVar for better type …
Serph91P Feb 24, 2026
d2b47ca
security: improve error handling in directory cleanup process
Serph91P Feb 24, 2026
a55a937
security: simplify authentication checks by removing token dependency
Serph91P Feb 24, 2026
6dd7802
security: replace token retrieval method for WebSocket connection and…
Serph91P Feb 24, 2026
276756c
security: remove localStorage token management and streamline WebSock…
Serph91P Feb 24, 2026
c0ed084
security: streamline authentication by removing token management and …
Serph91P Feb 24, 2026
9a4cdbc
security: update status and date for JWT storage migration to httpOnl…
Serph91P Feb 24, 2026
4140dcd
security: add comprehensive security scanning workflow with SAST/DAST…
Serph91P Feb 24, 2026
8ac9ba3
security: add GitHub Actions workflow for backend and frontend tests …
Serph91P Feb 24, 2026
7d4156d
security: remove deprecated GitHub Actions workflow for tests
Serph91P Feb 24, 2026
94ae05a
security: add CSRF middleware and update CORS headers to include CSRF…
Serph91P Feb 24, 2026
47c6a7a
security: log security events for invalid tokens and inactive users i…
Serph91P Feb 24, 2026
0f9e682
security: enhance authentication flow with CSRF protection and detail…
Serph91P Feb 24, 2026
848a285
security: add request parameter to library API routes and enforce rat…
Serph91P Feb 24, 2026
985f5a5
security: add request parameter and enforce rate limits for media API…
Serph91P Feb 24, 2026
9db9221
security: add request parameter and enforce rate limits for system AP…
Serph91P Feb 24, 2026
4297941
security: add request parameter and enforce rate limits for user acti…
Serph91P Feb 24, 2026
a041b76
security: implement CSRF protection middleware with token validation …
Serph91P Feb 24, 2026
065df14
security: log rate limit exceed events with detailed information
Serph91P Feb 24, 2026
b4a0cb8
security: implement structured logging for security events with sever…
Serph91P Feb 24, 2026
c7acf12
security: add CSRF token handling in request interceptor
Serph91P Feb 24, 2026
148d0f6
Merge pull request #20 from Serph91P/feature/security-hardening2
Serph91P Feb 24, 2026
7d07306
security: configure pytest options for strict asyncio mode and test p…
Serph91P Feb 24, 2026
2a0fad6
security: add initial test suite setup in __init__.py
Serph91P Feb 24, 2026
e20aa3e
security: add smoke test for application settings loading
Serph91P Feb 24, 2026
657ad70
Merge pull request #22 from Serph91P/feature/security-hardening2
Serph91P Feb 24, 2026
55e4bf7
feat: Genre Distribution Charts & Watch Patterns Heatmap (Phase 3)
Serph91P Feb 24, 2026
b193721
feat: complete Phase 2 - Timeline, Image Proxy, Grid View, Activity F…
Serph91P Feb 24, 2026
354ffad
feat: Phase 4 - Advanced Analytics (5 new endpoints + Analytics page)
Serph91P Feb 24, 2026
8cd53de
feat: Phase 5 - Smart Cleanup Integration
Serph91P Feb 24, 2026
f86e68d
Merge pull request #23 from Serph91P/feature/phase5-smart-cleanup
Serph91P Feb 24, 2026
dbac79b
docs: remove i18n from roadmap, fix changelog formatting
Serph91P Feb 24, 2026
bc6aa4d
fix(ci): make Trivy scan resilient to Docker Hub outages
Serph91P Feb 24, 2026
eb89429
feat: add actionable cleanup suggestions with direct user actions
Serph91P Feb 24, 2026
3691b1b
feat: add planned features documentation for statistics and analytics
Serph91P Feb 24, 2026
64f211d
feat: Add comprehensive DEVELOPMENT_STATUS document for MediaCurator
Serph91P Feb 24, 2026
7bffd74
feat: Remove DEVELOPMENT_STATUS document as it is no longer needed
Serph91P Feb 24, 2026
14c0d33
feat: remove Planned Features document as it is no longer needed
Serph91P Feb 24, 2026
16c5b64
feat: add endpoints for flagging and staging cleanup suggestions
Serph91P Feb 24, 2026
69d5a52
feat: add suggestion_flagged and suggestion_staged actions to AuditAc…
Serph91P Feb 24, 2026
b8d95d6
feat: implement flagging and staging actions for cleanup suggestions …
Serph91P Feb 24, 2026
40974b5
feat: update .env.example with structured sections and additional con…
Serph91P Feb 24, 2026
41c62ad
feat: add CORS and proxy configuration options to Docker Compose files
Serph91P Feb 24, 2026
dd55256
feat: remove docker-compose configuration file
Serph91P Feb 24, 2026
e7dc9c7
fix: ensure SECRET_KEY environment variable is properly quoted in Doc…
Serph91P Feb 24, 2026
b466c19
fix: properly quote SECRET_KEY environment variable in Docker Compose
Serph91P Feb 24, 2026
af9bbbd
Merge pull request #24 from Serph91P/fix/security-scan-trivy
Serph91P Feb 24, 2026
ce48662
Merge pull request #25 from Serph91P/feat/suggestions-take-actions
Serph91P Feb 24, 2026
d04131a
fix: add params support to BaseServiceClient.post() and delete()
Serph91P Feb 26, 2026
2fc6a48
Merge pull request #26 from Serph91P/fix/base-service-client-params
Serph91P Feb 26, 2026
d745413
fix: use params kwarg instead of manual query strings in service clients
Serph91P Feb 26, 2026
5e22385
Merge pull request #27 from Serph91P/fix/base-service-client-params
Serph91P Feb 26, 2026
292345b
fix: invalidate library cache after create/delete to prevent duplicat…
Serph91P Feb 26, 2026
c859f51
Merge pull request #28 from Serph91P/feature/fix-staging-library-cach…
Serph91P Feb 26, 2026
fc16805
fix: use collectionType query parameter for Emby library creation
Serph91P Feb 27, 2026
865baad
fix: inherit library type from source library for staging
Serph91P Feb 27, 2026
464bd3d
Merge pull request #29 from Serph91P/feature/fix-staging-library-cach…
Serph91P Feb 27, 2026
f83a935
chore(deps): bump docker/metadata-action from 5 to 6
dependabot[bot] Mar 9, 2026
c7bc34b
chore(deps): bump docker/build-push-action from 6 to 7
dependabot[bot] Mar 9, 2026
bcb0385
chore(deps): bump docker/setup-qemu-action from 3 to 4
dependabot[bot] Mar 9, 2026
f8af2da
chore(deps): bump the npm-minor group across 1 directory with 17 updates
dependabot[bot] Mar 9, 2026
2346797
Merge branch 'develop' into dependabot/npm_and_yarn/frontend/npm-mino…
Serph91P Mar 13, 2026
d2dac48
Merge pull request #35 from Serph91P/dependabot/npm_and_yarn/frontend…
Serph91P Mar 13, 2026
30e4ef0
Merge branch 'develop' into dependabot/github_actions/docker/setup-qe…
Serph91P Mar 13, 2026
b390dc6
Merge pull request #34 from Serph91P/dependabot/github_actions/docker…
Serph91P Mar 13, 2026
dfb4163
Merge pull request #33 from Serph91P/dependabot/github_actions/docker…
Serph91P Mar 13, 2026
ddb1057
Merge pull request #32 from Serph91P/dependabot/github_actions/docker…
Serph91P Mar 13, 2026
ab4c9d2
chore(deps): bump actions/upload-artifact from 6 to 7 (#39)
dependabot[bot] Mar 13, 2026
6b39e0c
chore(deps): bump docker/setup-buildx-action from 3 to 4 (#38)
dependabot[bot] Mar 13, 2026
d0ddb92
chore(deps): bump aquasecurity/trivy-action from 0.34.1 to 0.35.0 (#37)
dependabot[bot] Mar 13, 2026
7577f57
chore(deps): update safe frontend dependencies (#44)
Serph91P Mar 13, 2026
aaa6400
Merge branch 'main' into develop
Serph91P Mar 13, 2026
37ffca0
ci: unify versioning with conventional commits auto-bump (#46)
Serph91P Mar 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 87 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# Copilot Instructions for MediaCurator

## Commit Message Convention

This project uses **Conventional Commits** for automatic versioning and changelog generation.
Every commit message MUST follow this format:

```
<type>(<scope>): <description>

[optional body]

[optional footer(s)]
```

### Types

| Type | Purpose | Version Impact |
|------|---------|----------------|
| `feat` | New feature or capability | **Minor** bump (0.X.0) |
| `fix` | Bug fix | **Patch** bump (0.0.X) |
| `docs` | Documentation only | Patch bump |
| `style` | Formatting, whitespace, no code change | Patch bump |
| `refactor` | Code restructuring, no behavior change | Patch bump |
| `perf` | Performance improvement | Patch bump |
| `test` | Adding or updating tests | Patch bump |
| `chore` | Build, tooling, dependencies | Patch bump |
| `ci` | CI/CD pipeline changes | Patch bump |

### Breaking Changes → Major Bump

A breaking change triggers a **Major** version bump (X.0.0). Mark it with either:

- An `!` after the type/scope: `feat!: remove legacy API`
- A `BREAKING CHANGE:` footer in the commit body:
```
refactor(api): change auth endpoints

BREAKING CHANGE: /auth/login now requires JSON body instead of form data
```

### Scopes

Use scopes to indicate the affected area. Common scopes for this project:

- `api` – Backend API routes/endpoints
- `ui` – Frontend components/pages
- `auth` – Authentication/security
- `db` – Database/models/migrations
- `docker` – Docker/deployment
- `sync` – Media sync services (Radarr, Sonarr, Emby)
- `rules` – Cleanup rules engine
- `notifications` – Notification system
- `scheduler` – Background jobs/scheduler

### Examples

```
feat(api): add library statistics endpoint
fix(ui): correct pagination on media list
refactor(sync): simplify Sonarr client error handling
docs: update README with Docker Compose examples
feat!: redesign rule evaluation engine
chore(deps): update FastAPI to 0.115
ci: add ARM64 Docker build
perf(db): add index on media.last_played
```

### Rules

- Type and description are **required**
- Scope is optional but encouraged
- Description must be lowercase, imperative mood ("add" not "added" or "adds")
- No period at the end of the description
- Body and footer are optional
- Use `!` or `BREAKING CHANGE:` only for genuinely incompatible changes

## Language

- Commit messages in **English**
- Code comments in **English**

## Tech Stack

- **Backend**: Python 3.12, FastAPI, SQLAlchemy, SQLite/PostgreSQL
- **Frontend**: React, TypeScript, Vite, Tailwind CSS
- **Deployment**: Docker, GitHub Actions
133 changes: 102 additions & 31 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,26 +41,99 @@ jobs:
env:
REF: ${{ github.ref }}
run: |
# Get commit count for consistent versioning across branches
COMMIT_COUNT=$(git rev-list --count HEAD)

if [[ "$REF" == refs/tags/vdev.* ]]; then
# Dev tag (e.g., vdev.0.0.103 -> dev.0.0.103)
VERSION=${GITHUB_REF#refs/tags/v}
IS_PRERELEASE=true
elif [[ "$REF" == refs/tags/v* ]]; then
# Stable tag (e.g., v1.2.3 -> 1.2.3)
if [[ "$REF" == refs/tags/v* ]]; then
# Manual tag push - use the tag version directly
VERSION=${GITHUB_REF#refs/tags/v}
IS_PRERELEASE=false
elif [[ "$REF" == refs/heads/main ]]; then
# Main branch - stable release with same count as dev
VERSION="0.0.${COMMIT_COUNT}"
IS_PRERELEASE=false
if [[ "$VERSION" == *-dev* ]] || [[ "$VERSION" == dev.* ]]; then
IS_PRERELEASE=true
else
IS_PRERELEASE=false
fi
else
# Develop branch - prerelease with dev prefix
VERSION="dev.0.0.${COMMIT_COUNT}"
IS_PRERELEASE=true
# Auto-version: find highest version across ALL tags (dev + stable)
# Extract numeric version from all tags: v0.0.236, vdev.0.0.235, v0.1.0-dev, etc.
HIGHEST_TAG=""
HIGHEST_MAJOR=0
HIGHEST_MINOR=0
HIGHEST_PATCH=0

for tag in $(git tag -l 'v*'); do
# Strip tag prefix: v0.0.236 -> 0.0.236, vdev.0.0.235 -> 0.0.235
ver="$tag"
ver="${ver#v}" # remove leading v
ver="${ver#dev.}" # remove dev. prefix (old format)
ver="${ver%%-dev*}" # remove -dev* suffix (new format)

M=$(echo "$ver" | cut -d. -f1)
m=$(echo "$ver" | cut -d. -f2)
P=$(echo "$ver" | cut -d. -f3)

# Skip if not numeric
[[ "$M" =~ ^[0-9]+$ ]] || continue
[[ "$m" =~ ^[0-9]+$ ]] || continue
[[ "$P" =~ ^[0-9]+$ ]] || continue

# Compare: is this tag's version higher than current highest?
if (( M > HIGHEST_MAJOR )) || \
(( M == HIGHEST_MAJOR && m > HIGHEST_MINOR )) || \
(( M == HIGHEST_MAJOR && m == HIGHEST_MINOR && P > HIGHEST_PATCH )); then
HIGHEST_MAJOR=$M
HIGHEST_MINOR=$m
HIGHEST_PATCH=$P
HIGHEST_TAG="$tag"
fi
done

echo "Highest existing version: ${HIGHEST_MAJOR}.${HIGHEST_MINOR}.${HIGHEST_PATCH} (tag: ${HIGHEST_TAG:-none})"

# Analyze commits since last tag for conventional commit bump type
BUMP="patch"
if [ -n "$HIGHEST_TAG" ]; then
COMMITS=$(git log "${HIGHEST_TAG}..HEAD" --pretty=format:"%s%n%b" 2>/dev/null || echo "")
else
COMMITS=$(git log --pretty=format:"%s%n%b" 2>/dev/null || echo "")
fi

# Check for breaking changes -> major bump
if echo "$COMMITS" | grep -qiE '(^[a-z]+!:|BREAKING CHANGE)'; then
BUMP="major"
# Check for features -> minor bump
elif echo "$COMMITS" | grep -qiE '^feat(\(|:)'; then
BUMP="minor"
fi

echo "Bump type: $BUMP"

# Calculate next version
case "$BUMP" in
major)
NEXT_MAJOR=$((HIGHEST_MAJOR + 1))
NEXT_MINOR=0
NEXT_PATCH=0
;;
minor)
NEXT_MAJOR=$HIGHEST_MAJOR
NEXT_MINOR=$((HIGHEST_MINOR + 1))
NEXT_PATCH=0
;;
patch)
NEXT_MAJOR=$HIGHEST_MAJOR
NEXT_MINOR=$HIGHEST_MINOR
NEXT_PATCH=$((HIGHEST_PATCH + 1))
;;
esac

VERSION="${NEXT_MAJOR}.${NEXT_MINOR}.${NEXT_PATCH}"

if [[ "$REF" == refs/heads/main ]]; then
IS_PRERELEASE=false
else
# Develop branch: append -dev suffix
VERSION="${VERSION}-dev"
IS_PRERELEASE=true
fi
fi

echo "version=${VERSION}" >> $GITHUB_OUTPUT
echo "is_prerelease=${IS_PRERELEASE}" >> $GITHUB_OUTPUT
echo "Version: ${VERSION}, Prerelease: ${IS_PRERELEASE}"
Expand All @@ -72,9 +145,9 @@ jobs:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
# For tagged releases
type=semver,pattern={{version}},enable=${{ startsWith(github.ref, 'refs/tags/v') && !startsWith(github.ref, 'refs/tags/vdev') }}
type=semver,pattern={{major}}.{{minor}},enable=${{ startsWith(github.ref, 'refs/tags/v') && !startsWith(github.ref, 'refs/tags/vdev') }}
type=semver,pattern={{major}},enable=${{ startsWith(github.ref, 'refs/tags/v') && !startsWith(github.ref, 'refs/tags/vdev') }}
type=semver,pattern={{version}},enable=${{ startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, 'dev') }}
type=semver,pattern={{major}}.{{minor}},enable=${{ startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, 'dev') }}
type=semver,pattern={{major}},enable=${{ startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, 'dev') }}
# For main branch
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }}
type=raw,value=stable,enable=${{ github.ref == 'refs/heads/main' }}
Expand All @@ -100,7 +173,7 @@ jobs:
uses: docker/setup-qemu-action@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
Expand Down Expand Up @@ -153,17 +226,15 @@ jobs:
CURRENT_VERSION="${{ needs.prepare.outputs.version }}"
BRANCH="$REF_NAME"

# Find the last tag based on branch
# For develop: look for vdev.* tags only
# For main/tags: look for v* tags (excluding vdev.*)
# Find the last tag for changelog comparison
if [[ "$BRANCH" == "develop" ]]; then
# Get all dev tags, sort by version number, take the last one
LAST_TAG=$(git tag -l 'vdev.*' --sort=-version:refname | head -n1 || echo "")
echo "Looking for dev tags only"
# Get last dev tag (old vdev.* or new v*-dev format), sorted by creation date
LAST_TAG=$(git tag -l --sort=-creatordate | grep -E '(^vdev\.|.*-dev$)' | head -n1 || echo "")
echo "Looking for dev tags"
else
# Get stable tags (v* but not vdev.*), sort by version, take the last one
LAST_TAG=$(git tag -l 'v*' --sort=-version:refname | grep -v '^vdev\.' | head -n1 || echo "")
echo "Looking for stable tags only"
# Get last stable tag (exclude all dev tags)
LAST_TAG=$(git tag -l 'v*' --sort=-version:refname | grep -vE '(^vdev\.|.*-dev$)' | head -n1 || echo "")
echo "Looking for stable tags"
fi

echo "Branch: $BRANCH"
Expand Down Expand Up @@ -293,7 +364,7 @@ jobs:
tag_name: ${{ startsWith(github.ref, 'refs/tags/') && github.ref_name || format('v{0}', needs.prepare.outputs.version) }}
# CRITICAL: Create tag on the current commit, not the default branch
target_commitish: ${{ github.sha }}
name: ${{ github.ref_name == 'develop' && format('Development Build {0}', needs.prepare.outputs.version) || format('Release {0}', needs.prepare.outputs.version) }}
name: ${{ needs.prepare.outputs.is_prerelease == 'true' && format('Development Build {0}', needs.prepare.outputs.version) || format('Release {0}', needs.prepare.outputs.version) }}
body_path: release_notes.md
draft: false
prerelease: ${{ needs.prepare.outputs.is_prerelease }}
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/security-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:

- name: Upload Bandit results
if: always()
uses: actions/upload-artifact@v6
uses: actions/upload-artifact@v7
with:
name: bandit-results
path: bandit-results.json
Expand Down Expand Up @@ -88,7 +88,7 @@ jobs:

- name: Upload results
if: always()
uses: actions/upload-artifact@v6
uses: actions/upload-artifact@v7
with:
name: pip-audit-results
path: pip-audit-results.json
Expand Down Expand Up @@ -126,7 +126,7 @@ jobs:

- name: Upload results
if: always()
uses: actions/upload-artifact@v6
uses: actions/upload-artifact@v7
with:
name: npm-audit-results
path: frontend/npm-audit-results.json
Expand All @@ -142,7 +142,7 @@ jobs:
- uses: actions/checkout@v6

- name: Run Trivy filesystem scanner (SARIF)
uses: aquasecurity/trivy-action@0.34.1
uses: aquasecurity/trivy-action@0.35.0
with:
scan-type: 'fs'
scan-ref: '.'
Expand All @@ -160,7 +160,7 @@ jobs:

- name: Run Trivy filesystem scanner (table for logs)
if: always()
uses: aquasecurity/trivy-action@0.34.1
uses: aquasecurity/trivy-action@0.35.0
with:
scan-type: 'fs'
scan-ref: '.'
Expand All @@ -184,7 +184,7 @@ jobs:

- name: Run Trivy image scanner (SARIF)
if: steps.docker-build.outcome == 'success'
uses: aquasecurity/trivy-action@0.34.1
uses: aquasecurity/trivy-action@0.35.0
with:
image-ref: 'mediacurator:scan'
format: 'sarif'
Expand All @@ -201,7 +201,7 @@ jobs:

- name: Run Trivy image scanner (table for logs)
if: steps.docker-build.outcome == 'success'
uses: aquasecurity/trivy-action@0.34.1
uses: aquasecurity/trivy-action@0.35.0
with:
image-ref: 'mediacurator:scan'
format: 'table'
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ venv.bak/

# IDE
.idea/
.vscode/
.vscode/*
!.vscode/settings.json
*.swp
*.swo
*~
Expand Down
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"github.copilot.chat.commitMessageGeneration.instructions": [
{
"text": "Use Conventional Commits format: <type>(<scope>): <description>. Types: feat (minor bump), fix (patch bump), docs, style, refactor, perf, test, chore, ci. Use ! after type for breaking changes (major bump). Scopes: api, ui, auth, db, docker, sync, rules, notifications, scheduler. Description must be lowercase, imperative mood, no period at end. English only."
}
]
}
Loading
Loading