Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
304 commits
Select commit Hold shift + click to select a range
7d3b1ea
Colored logging
Alia5 Dec 5, 2025
570ea41
Devices: Fix Vid/PID override
Alia5 Dec 5, 2025
6d5f209
Fix bus auto-cleanup
Alia5 Dec 5, 2025
337dbb3
Fix cargo publish
Alia5 Dec 6, 2025
01bf63b
Fix bench_test timeouts
Alia5 Dec 6, 2025
51f2528
Rename: SDK -> Client Library
Alia5 Dec 6, 2025
9fda332
Update github release markdown descriptions
Alia5 Dec 6, 2025
1564343
Update README.md / docs
Alia5 Dec 6, 2025
d022341
Fix: free bus IDs not getting re-used
Alia5 Dec 6, 2025
fbb1e00
Update README/docs
Alia5 Dec 6, 2025
873895e
Fix go version info for local builds
Alia5 Dec 6, 2025
5f5bb0d
Update README.md
Alia5 Dec 13, 2025
3631997
Breaking: Use int16 instead of int8 for mouse relative actions (dx, d…
Alia5 Dec 16, 2025
a9dd120
Update pipeline
Alia5 Dec 17, 2025
667e92c
Add install command / scripts
Alia5 Dec 17, 2025
c676a24
Update docs
Alia5 Dec 17, 2025
bba6246
Fix benchmarks when real controllers present + add steamdeck bench
Alia5 Dec 18, 2025
b4f078f
Disable nagles algorithm
Alia5 Dec 18, 2025
f0229f4
gofmt
Alia5 Dec 18, 2025
c29a495
enforce gofmt
Alia5 Dec 18, 2025
92c11f7
device-states: use ptr receivers with consistent naming
Alia5 Dec 19, 2025
33d3219
Add "ping" endpoint
Alia5 Dec 19, 2025
aa25cda
go-client: relax strict JSON parsing
Alia5 Dec 19, 2025
75e9d77
install-scripts: detect if is update
Alia5 Dec 19, 2025
2d27c29
Update README / docs
Alia5 Dec 19, 2025
2e10932
Fix excessive CPU usage
Alia5 Dec 20, 2025
6d44801
Mouse/Keyboard: decrease endpoint interval
Alia5 Dec 20, 2025
b112f58
Update docs/README
Alia5 Dec 20, 2025
207a7ca
Update docs
Alia5 Dec 20, 2025
809b9ce
Fix install scripts and docs
Alia5 Dec 21, 2025
cdc61ba
attempt to make viiper install more steamos friendly
Alia5 Dec 21, 2025
d4ccaa2
Linux install script: handle updates more gracefully
Alia5 Dec 22, 2025
9fe2c1e
fmt
Alia5 Dec 22, 2025
2a6bc1c
Add logo to mkdocs header
Alia5 Dec 22, 2025
355f66e
Improve install scripts and install usbip
Alia5 Dec 23, 2025
b2ea503
Fix duplicated "\" on windows autorun registry entry
Alia5 Dec 24, 2025
2108932
windows-install: always re-configure startup / launch
Alia5 Dec 24, 2025
5308b8c
Windows: Detect gui launches and auto-run server in BG
Alia5 Dec 24, 2025
f5c9a08
gofmt
Alia5 Dec 24, 2025
6342a6b
Windows-Install: Fix VIIPER server closing upon terminal close
Alia5 Dec 24, 2025
32aa8d1
Update docs
Alia5 Dec 24, 2025
879c418
Add Device "E2E" Tests
Alia5 Dec 25, 2025
ca3c62d
Add codecov
Alia5 Dec 25, 2025
ade60ea
codecov ignore
Alia5 Dec 25, 2025
d9740b9
Improve HID/Class Descriptor Abstractions
Alia5 Dec 25, 2025
2f296b4
SteamDeck (Jupiter) Controller emulation
Alia5 Dec 25, 2025
807fb2c
Fix SteamDeck dummy interfaces showing up "broken" in Windows
Alia5 Dec 25, 2025
d8cd7c7
Update README
Alia5 Dec 25, 2025
425c0fc
Fix SDK-Gen when using shift ops in device consts
Alia5 Dec 25, 2025
406ce0f
Fix steamdeck viiper:wire annotations
Alia5 Dec 25, 2025
e20e0dc
Update docs
Alia5 Dec 25, 2025
49dd96a
Fix busCreate with id 0 not choosing next free bus
Alia5 Dec 25, 2025
376bbbf
Fix incorrect coverage reports
Alia5 Dec 25, 2025
24f875f
Update docs
Alia5 Dec 25, 2025
86005ba
Fix faulty steamdeck re-tx logic
Alia5 Dec 29, 2025
6a127a1
Fix logging
Alia5 Dec 30, 2025
0a4258a
Remove steamdeck emulation :/
Alia5 Dec 30, 2025
05846e9
Windows: Install-Script: Fix updating
Alia5 Jan 9, 2026
36ae526
Windows: log to file in autorun config
Alia5 Jan 9, 2026
9ccf21c
Return API err if autoattach enabled and fails
Alia5 Jan 13, 2026
f17e92b
Fix "typo"
Alia5 Jan 14, 2026
b18bcbd
DS4 Emulation
Alia5 Jan 14, 2026
62d4363
Update docs
Alia5 Jan 16, 2026
346229d
relax codecov...
Alia5 Jan 16, 2026
fb4b62d
Update README
Alia5 Jan 19, 2026
b3beeb1
Configurable write batching time
Alia5 Jan 19, 2026
fce27cb
Update Readme
Alia5 Jan 21, 2026
7ffbe49
Update copyright
Alia5 Jan 24, 2026
796a8cc
Update README
Alia5 Jan 26, 2026
d7ffa0b
Update docs
Alia5 Jan 26, 2026
424e873
SECURITY: Fix unauthenticated/unencrypted remote traffic
Alia5 Jan 30, 2026
f92a709
Update docs
Alia5 Jan 30, 2026
59564a3
Update e2e benches
Alia5 Jan 30, 2026
f2b64aa
Update typescript SDK
Alia5 Jan 30, 2026
a71b9f1
Update C# Client
Alia5 Jan 30, 2026
fdb42a0
gofmt
Alia5 Jan 30, 2026
6ff058e
Update C++ client
Alia5 Jan 31, 2026
af39b52
Remove C API client
Alia5 Jan 31, 2026
6219d1d
Update Rust Client
Alia5 Jan 31, 2026
8b6211c
SECURITY: Authenticated/Encrypted API
Alia5 Jan 31, 2026
d8cd21d
Ignore codegen from coverage
Alia5 Jan 31, 2026
1232a52
Rust: Fix deadlock
Alia5 Jan 31, 2026
d5f3c78
linux: fix keyfile paths
Alia5 Jan 31, 2026
eb09dcd
fix codecov yml
Alia5 Jan 31, 2026
787aedb
Update Readme
Alia5 Feb 2, 2026
e71df76
Breaking: Support XInput subtypes
sanjay900 Feb 8, 2026
370517f
Revise Xbox 360 controller documentation
sanjay900 Feb 8, 2026
71ef81a
Upgrade to go 1.26
Alia5 Mar 15, 2026
fcdbc6e
Clean changelog gen
Alia5 Mar 15, 2026
fd4d973
Add auto update
Alia5 Mar 15, 2026
ee448d8
Update deps / Go
Alia5 Apr 21, 2026
36cf8c3
libVIIPER
Alia5 Apr 27, 2026
a82b7a9
Fix swallowing error
Alia5 Apr 28, 2026
b7dcec9
Add libVIIPER c# example
Alia5 Apr 28, 2026
9df9750
Update dotnet 8.0 -> 10
Alia5 Apr 28, 2026
7fddb69
Update Readme
Alia5 Apr 28, 2026
6549f8c
Add metaInfo to libVIIPER.dll
Alia5 Apr 28, 2026
9d08b02
Update docs
Alia5 Apr 28, 2026
baa5a07
Windows: Update install script / USBIP-Driver
Alia5 Apr 28, 2026
1f6377c
Gofmt
Alia5 Apr 28, 2026
feb16d4
Update pipeline
Alia5 Apr 28, 2026
c028a59
Windows: Add Tray Icon
Alia5 Apr 28, 2026
2632bdf
Update README
Alia5 Apr 28, 2026
e22d6fe
Update README.md
Alia5 May 11, 2026
c31ab2b
Fix LangIDs
Alia5 May 12, 2026
e745630
Handle usbGetStatus
Alia5 May 12, 2026
0297dda
Fix xbox360 capability request
Alia5 May 12, 2026
27532fb
Add dualshock4 example
Alia5 May 12, 2026
97da27a
WinInstall: Fix USBIP-Win2 driver detection
Alia5 May 12, 2026
904bef3
gofmt
Alia5 May 12, 2026
3c5df8f
Added quotes around paths for libVIIPER dir check
Ryochan7 May 25, 2026
5b3f7fd
Replace makefile with justfile
Alia5 May 28, 2026
9710536
Introduce golangci-lint and make linter happy
Alia5 May 28, 2026
717a95e
Fix CI: build windows targets on windows
Alia5 May 28, 2026
520f842
Include license notices in CI artifacts
Alia5 May 29, 2026
2491ecb
Fix CI
Alia5 May 29, 2026
10f42b7
Add log level alias
Alia5 May 30, 2026
8c11acd
Default server command
Alia5 May 30, 2026
0a07638
Update deps
Alia5 May 30, 2026
a8e946a
Improve/Fix "isRunfromCLI" logic (Windows)
Alia5 May 30, 2026
0e3192c
Attempt fixing tray menu not showing up anymore after a while
Alia5 May 30, 2026
d2af157
Solidify autoattach handling
Alia5 May 30, 2026
176ee7c
Add FallBack HID transfer processing
Alia5 May 31, 2026
7e94d44
Rename hid.Repoer -> hid.ReportDescriptor
Alia5 May 31, 2026
3f90b68
Rename DeviceRegister -> DeviceHandler
Alia5 May 31, 2026
e27552a
Fix DS4 Emulation, add metadata handling
Alia5 May 31, 2026
c5b58c4
Handle deviceSpecific create data as string internally
Alia5 May 31, 2026
f4eda9b
Fix client lib builds
Alia5 May 31, 2026
6fd0c9f
Nintendo Switch 2 Pro virtual device support
Cookiekira May 26, 2026
9fddebb
NS2: Factor out Serial/Battery/ChargingState to separate struct
Alia5 May 31, 2026
2906465
Fix MSOS10 Descriptors after rebase
Alia5 May 31, 2026
2280786
Update SDK generator
Alia5 May 31, 2026
eacbd6c
Include meta in genned client libs
Alia5 May 31, 2026
e01dc15
Exclude codegen from release builds
Alia5 May 31, 2026
77916d8
NS2Pro: optional metaState fields
Alia5 May 31, 2026
7f7ffd0
libVIIPER: add newly introduced metaState to DS4 device create
Alia5 May 31, 2026
583a36f
libVIIPER: NS2Pro support
Alia5 May 31, 2026
c7c00ca
Add libVIIPER NS2Pro example
Alia5 May 31, 2026
1ca2ea0
NS2Pro: Fix serial override
Alia5 May 31, 2026
aedbbe7
Fix generate changelog script
Alia5 May 31, 2026
4e5cd96
Install-Script: Always restart VIIPER server
Alia5 May 31, 2026
e694ab0
lower ds4 descriptor interval
Alia5 Jun 1, 2026
31a240c
Experimental DualSense (and Edge) Emulation
Alia5 Jun 1, 2026
e674634
Update docs
Alia5 Jun 1, 2026
c1f5abc
Fix colored log output when log file is enabled
Alia5 Jun 1, 2026
21fb4eb
color log keys
Alia5 Jun 1, 2026
a1abbc5
Update docs
Alia5 Jun 1, 2026
44c465b
Fix DualSenseEdge Back button consts
Alia5 Jun 1, 2026
6b71b14
Fix dualsense example
Alia5 Jun 1, 2026
19bc99f
Add (neutral) InputState constructors to devices
Alia5 Jun 4, 2026
7e33d2d
Improve device emulation efficiency
Alia5 Jun 12, 2026
209cffb
Unmagic ns2pro consts / fix interval
Alia5 Jun 12, 2026
cfb8ca1
Use own SDL cgo wrapper instead of wasm/purego-based for e2e tests
Alia5 Jun 12, 2026
88d5125
Move to wall-clock based report timestamps
Alia5 Jun 12, 2026
0f70ea8
Fix tests
Alia5 Jun 12, 2026
88f66f1
Fix pipeline
Alia5 Jun 12, 2026
ac10bb4
Expose DualSense adaptive trigger feedback
hbashton Jun 13, 2026
2285d19
Trigger VIIPER CI build
hbashton Jun 13, 2026
09daa00
Allow hash-only dev versions in Windows resources
hbashton Jun 13, 2026
03317f6
Keep DualSense extended feedback on stream dispatch
hbashton Jun 13, 2026
fe394f8
Accept DualSense output reports for feedback
hbashton Jun 13, 2026
960c0e6
Log raw DualSense host output reports
hbashton Jun 13, 2026
80effca
Preserve DualSense touch tracking bytes
hbashton Jun 13, 2026
b6a59c1
Stabilize DualSense input report status bytes
hbashton Jun 13, 2026
1fcbbf2
Fix DualSense touch and feedback packet layout
hbashton Jun 13, 2026
0f39124
Fix DualSense feedback lint issues
hbashton Jun 13, 2026
a36338a
Allow DualSense active touch tracking zero
hbashton Jun 13, 2026
3f73ccb
Document native DualSense feedback wire gaps
hbashton Jun 13, 2026
d810276
Clarify DualSense compact feedback size
hbashton Jun 13, 2026
1312a94
Match DualSense USB output report size
hbashton Jun 13, 2026
6eb1aae
Respect DualSense output report update flags
hbashton Jun 13, 2026
e03a35d
Match normal DualSense USB identity
hbashton Jun 13, 2026
15b1bfc
Gofmt DualSense constants
hbashton Jun 13, 2026
772d1d5
Fix DualSense descriptor and generated output names
hbashton Jun 14, 2026
b67f3f1
Revert "Allow DualSense active touch tracking zero"
hbashton Jun 14, 2026
0185995
Align DualSense touch fallback docs and tests
hbashton Jun 14, 2026
8a5894f
Gofmt DualSense touch state fields
hbashton Jun 14, 2026
3e2bf74
Add DualSense host traffic diagnostics
hbashton Jun 14, 2026
85e5887
Fix DualSense traffic client codegen
hbashton Jun 14, 2026
079f61c
Preserve exported DTO names in codegen
hbashton Jun 14, 2026
17587a4
Fix C++ DTO codegen for custom arrays
hbashton Jun 14, 2026
38759b0
Preserve DualSense native output reports
hbashton Jun 14, 2026
8a2aa57
Fix Rust codegen defaults for large arrays
hbashton Jun 14, 2026
66a7414
Add DualSense Bluetooth haptics mapping notes
hbashton Jun 14, 2026
716fb00
Document Ghost DualSense bow capture
hbashton Jun 14, 2026
cab8a24
Add experimental DualSense haptics audio bridge
hbashton Jun 14, 2026
d6c3e37
Fix DualSense audio interface startup
hbashton Jun 14, 2026
2d233df
Fix DualSense haptics audio endpoint format
hbashton Jun 14, 2026
d7c2fff
Bump DualSense descriptor revision for audio fix
hbashton Jun 14, 2026
a983de6
Add DualSense audio feature unit
hbashton Jun 14, 2026
e41051c
Emit UAC audio endpoint trailing fields
hbashton Jun 14, 2026
90f6404
Clarify DualSense virtual audio channel layout
hbashton Jun 20, 2026
a38594c
Fix virtual DualSense UAC endpoint startup
hbashton Jun 21, 2026
90dd503
Preserve captured DualSense audio endpoint layout
hbashton Jun 21, 2026
9d2f1c1
Implement USBIP isochronous transfer framing
hbashton Jun 21, 2026
9db722c
Format DualSense UAC changes
hbashton Jun 22, 2026
58a6c69
Match virtual DualSense UAC layout
hbashton Jun 22, 2026
f970356
Pace DualSense audio ISO transfers by PCM duration
hbashton Jun 22, 2026
6ef5723
Keep HID feedback responsive during audio pacing
hbashton Jun 22, 2026
6a572e5
Revert "Keep HID feedback responsive during audio pacing"
hbashton Jun 22, 2026
286713e
Revert "Pace DualSense audio ISO transfers by PCM duration"
hbashton Jun 22, 2026
4928cea
Add combined DualSense Bluetooth haptics feedback
hbashton Jun 22, 2026
2534f69
Match virtual DualSense USB product identity
hbashton Jun 23, 2026
425481b
Match DualSense USB configuration identity
hbashton Jun 23, 2026
c4726f0
Reduce DualSense Bluetooth haptics latency
hbashton Jun 24, 2026
b9dd8cf
Diagnose DualSense ISO audio pacing
hbashton Jun 24, 2026
3332717
Limit ISO pacing diagnostics to audio transfers
hbashton Jun 24, 2026
aa45ffe
Pace ISO audio completions against service deadlines
hbashton Jun 24, 2026
d1f0f32
Stabilize USB/IP integration test deadlines
hbashton Jun 24, 2026
214fded
Merge pull request #1 from hbashton/fix-iso-audio-clock
hbashton Jun 24, 2026
dc475f1
Expose DualSense microphone input endpoint
hbashton Jun 25, 2026
cac6310
Merge pull request #2 from hbashton/fix-iso-audio-clock
hbashton Jun 25, 2026
81b3e49
Harden DualSense mic stream framing
hbashton Jun 26, 2026
81ab9ee
Use numeric DualSense stream magic constants
hbashton Jun 26, 2026
9929bc8
Handle USB audio ISO-IN microphone packets
hbashton Jun 26, 2026
711a95a
Track DualSense mic interface state
hbashton Jun 26, 2026
d7f306f
Drop corrupted DualSense mic stream input frames
hbashton Jun 26, 2026
911ba78
Block mic transport bytes from DualSense HID input
hbashton Jun 26, 2026
55fa62a
Harden DualSense mic input state isolation
hbashton Jun 27, 2026
c931873
Add DualSense mic input corruption diagnostics
hbashton Jun 27, 2026
5101784
Fix DualSense diagnostics lint
hbashton Jun 27, 2026
e6b3935
Replay latest HID output state for late streams
hbashton Jun 28, 2026
818065a
Neutralize DualSense mic transport fragments
hbashton Jun 28, 2026
8bd2246
Harden DualSense mic stream input guards
hbashton Jun 28, 2026
3ec6305
Harden DualSense mic endpoint handling
hbashton Jun 28, 2026
e0e598e
Harden DualSense microphone stream framing
hbashton Jul 17, 2026
4db2c30
Build microphone branch snapshots
hbashton Jul 17, 2026
279b37c
Remove unused microphone state helper
hbashton Jul 17, 2026
09e6f34
Route DualSense microphone ISO input correctly
hbashton Jul 17, 2026
f1e8834
Preserve DualSense framed stream protocol
hbashton Jul 17, 2026
95536ab
Pack USBIP microphone ISO input correctly
hbashton Jul 17, 2026
1aa6591
Retarget installation docs to hbashton releases
hbashton Jul 18, 2026
b24d45f
Retarget installation docs to hbashton releases
hbashton Jul 18, 2026
b847e4b
Avoid false neutral DualSense input reports
hbashton Jul 18, 2026
a0fba05
Revert "Avoid false neutral DualSense input reports"
hbashton Jul 18, 2026
501b059
Preserve DualSense HID input ordering
hbashton Jul 18, 2026
a47d816
Revert "Preserve DualSense HID input ordering"
hbashton Jul 18, 2026
885ffe6
Merge microphone rebuild into main
hbashton Jul 18, 2026
f182d8c
Merge remote-tracking branch 'origin/microphone-rebuild' into ds4-aud…
hbashton Jul 18, 2026
ba7caf6
Merge remote-tracking branch 'origin/main' into ds4-audio-emulation
hbashton Jul 18, 2026
836de13
Add DualShock 4 virtual audio input
hbashton Jul 18, 2026
e5e8b98
Build DS4 audio development snapshots
hbashton Jul 19, 2026
1069a5e
Add low-latency DS4 audio duplex transport
hbashton Jul 19, 2026
1bb94d1
Harden Sony virtual audio duplex transport
hbashton Jul 20, 2026
63b1901
Fix snapshot lint and SDK generation
hbashton Jul 20, 2026
188011c
Replay Xbox feedback across stream startup
hbashton Jul 20, 2026
4ac95b3
Pair DualSense speaker audio and haptics atomically
hbashton Jul 21, 2026
f535bf1
Keep virtual DualSense microphone PCM at unity
hbashton Jul 21, 2026
02fffe6
Add PlayStation audio-only virtual devices
hbashton Jul 24, 2026
3fd8d85
Prevent stale release artifacts
potpiemuncher Jul 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
155 changes: 141 additions & 14 deletions .github/scripts/generate-changelog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,131 @@ set -euo pipefail
OUTPUT_FILE="$1"
TAG_OR_RANGE="${2:-}"

normalize_changelog_type() {
case "${1,,}" in
feat|feature)
echo "feature"
;;
fix)
echo "fix"
;;
misc)
echo "misc"
;;
*)
echo ""
;;
esac
}

extract_changelog_type() {
local commit_text="$1"
local trailer_value=""

trailer_value=$(printf '%s\n' "$commit_text" |
git interpret-trailers --parse |
awk 'BEGIN{IGNORECASE=1} /^[[:space:]]*changelog[[:space:]]*:/ {sub(/^[^:]*:[[:space:]]*/, "", $0); print tolower($0); exit}')

if [[ -n "$trailer_value" ]]; then
normalize_changelog_type "$trailer_value"
return
fi

if printf '%s\n' "$commit_text" | grep -iqE 'changelog[[:space:]]*\((feature|feat)\)'; then
echo "feature"
elif printf '%s\n' "$commit_text" | grep -iqE 'changelog[[:space:]]*\((fix)\)'; then
echo "fix"
elif printf '%s\n' "$commit_text" | grep -iqE 'changelog[[:space:]]*\((misc)\)'; then
echo "misc"
elif printf '%s\n' "$commit_text" | grep -iqE '^[[:space:]]*changelog[[:space:]]*:[[:space:]]*(feature|feat)[[:space:]]*$'; then
echo "feature"
elif printf '%s\n' "$commit_text" | grep -iqE '^[[:space:]]*changelog[[:space:]]*:[[:space:]]*(fix)[[:space:]]*$'; then
echo "fix"
elif printf '%s\n' "$commit_text" | grep -iqE '^[[:space:]]*changelog[[:space:]]*:[[:space:]]*(misc)[[:space:]]*$'; then
echo "misc"
else
echo ""
fi
}

extract_repo_slug() {
if [[ -n "${GITHUB_REPOSITORY:-}" ]]; then
echo "$GITHUB_REPOSITORY"
return
fi

local remote_url=""
remote_url=$(git config --get remote.origin.url 2>/dev/null || true)
if [[ -z "$remote_url" ]]; then
return
fi

if [[ "$remote_url" =~ ^git@github\.com:([^/]+/[^/.]+)(\.git)?$ ]]; then
echo "${BASH_REMATCH[1]}"
elif [[ "$remote_url" =~ ^https://github\.com/([^/]+/[^/.]+)/?(\.git)?$ ]]; then
echo "${BASH_REMATCH[1]}"
fi
}

resolve_github_login() {
local commit_hash="$1"
local repo_slug="$2"
local author_name="$3"
local api_url="${GITHUB_API_URL:-https://api.github.com}"
local login=""

if [[ -n "$repo_slug" ]] && command -v curl >/dev/null 2>&1; then
local auth_args=()
if [[ -n "${GITHUB_TOKEN:-}" ]]; then
auth_args=(-H "Authorization: Bearer ${GITHUB_TOKEN}")
elif [[ -n "${GH_TOKEN:-}" ]]; then
auth_args=(-H "Authorization: Bearer ${GH_TOKEN}")
fi

local response=""
response=$(curl -fsSL "${auth_args[@]}" -H "Accept: application/vnd.github+json" "$api_url/repos/$repo_slug/commits/$commit_hash" 2>/dev/null || true)
if [[ -n "$response" ]]; then
local python_bin=""
python_bin=$(command -v python3 2>/dev/null || command -v python 2>/dev/null || true)
if [[ -n "$python_bin" ]]; then
login=$(printf '%s' "$response" | "$python_bin" -c 'import json,sys; data=json.load(sys.stdin); print(((data.get("author") or {}).get("login")) or "")' 2>/dev/null || true)
fi
fi
fi

if [[ -z "$login" && "$author_name" =~ ^[A-Za-z0-9][A-Za-z0-9-]{0,38}$ ]]; then
login="$author_name"
fi

echo "$login"
}

build_thanks_line() {
local commit_hash="$1"
local repo_slug="$2"
local repo_owner="$3"
local author_name="$4"
local author_email="$5"
local committer_name="$6"
local committer_email="$7"

local author_login=""
author_login=$(resolve_github_login "$commit_hash" "$repo_slug" "$author_name")

local is_third_party="false"
if [[ -n "$author_login" && -n "$repo_owner" ]]; then
if [[ "${author_login,,}" != "${repo_owner,,}" ]]; then
is_third_party="true"
fi
elif [[ "${author_name,,}" != "${committer_name,,}" || "${author_email,,}" != "${committer_email,,}" ]]; then
is_third_party="true"
fi

if [[ "$is_third_party" == "true" && -n "$author_login" ]]; then
printf ' thanks to @%s' "$author_login"
fi
}

mkdir -p "$(dirname "$OUTPUT_FILE")"

if [[ -z "$TAG_OR_RANGE" ]]; then
Expand Down Expand Up @@ -40,18 +165,28 @@ mapfile -t COMMITS < <(git log --pretty=format:'%H' $LOG_RANGE)
FEATURES=""
FIXES=""
MISC=""
REPO_SLUG=$(extract_repo_slug)
REPO_OWNER="${REPO_SLUG%%/*}"

for commit_hash in "${COMMITS[@]}"; do
commit_msg=$(git log -1 --pretty=format:'%s' "$commit_hash")
commit_body=$(git log -1 --pretty=format:'%b' "$commit_hash")
# Extract changelog type using awk (case-insensitive, robust)
changelog_type=$(echo "$commit_body" | awk 'BEGIN{IGNORECASE=1} /changelog[(: ]/ {if ($0 ~ /feature/) print "feature"; else if ($0 ~ /fix/) print "fix"; else if ($0 ~ /misc/) print "misc"; exit}')
commit_text=$(git log -1 --pretty=format:'%B' "$commit_hash")
author_name=$(git log -1 --pretty=format:'%an' "$commit_hash")
author_email=$(git log -1 --pretty=format:'%ae' "$commit_hash")
committer_name=$(git log -1 --pretty=format:'%cn' "$commit_hash")
committer_email=$(git log -1 --pretty=format:'%ce' "$commit_hash")
changelog_type=$(extract_changelog_type "$commit_text")
if [ -n "$changelog_type" ]; then
body_content=$(echo "$commit_body" | awk 'BEGIN{IGNORECASE=1} !/changelog[(: ]/ && NF')
body_content=$(echo "$commit_body" | awk 'BEGIN{IGNORECASE=1} !/changelog[(: ]/ && !/^[[:space:]]*co-authored-by:[[:space:]]*/ && NF')
thanks_line=$(build_thanks_line "$commit_hash" "$REPO_SLUG" "$REPO_OWNER" "$author_name" "$author_email" "$committer_name" "$committer_email")
entry="- $commit_msg"
if [ -n "$body_content" ]; then
entry=$(printf "%s\n%s" "$entry" "$(echo "$body_content" | sed 's/^/ /')")
fi
if [ -n "$thanks_line" ]; then
entry=$(printf "%s \n%s" "$entry" "$thanks_line")
fi
if [ "$changelog_type" = "feature" ]; then
FEATURES=$(printf "%s\n%s" "$FEATURES" "$entry")
elif [ "$changelog_type" = "fix" ]; then
Expand All @@ -62,35 +197,27 @@ for commit_hash in "${COMMITS[@]}"; do
fi
done

# Write changelog
{
echo "# Changelog for $VERSION_TITLE"
echo ""
if [[ -z "$TAG_OR_RANGE" ]]; then
echo "This page shows unreleased changes in the development version."
else
echo "Release Date: $(date +'%Y-%m-%d')"
fi
echo ""
echo "$CONTEXT_MSG"
echo ""

if [[ -n "$FEATURES" ]]; then
echo "## ✨ New Features"
echo "### ✨ New Features"
echo ""
echo "$FEATURES"
echo ""
fi

if [[ -n "$FIXES" ]]; then
echo "## 🐛 Fixes"
echo "### 🐛 Fixes"
echo ""
echo "$FIXES"
echo ""
fi

if [[ -n "$MISC" ]]; then
echo "## 🔧 Miscellaneous"
echo "### 🔧 Miscellaneous"
echo ""
echo "$MISC"
echo ""
Expand Down
17 changes: 9 additions & 8 deletions .github/workflows/PR_check.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
name: PR-Check

on:
pull_request:
branches:
- '**'
pull_request:
branches:
- "**"

permissions:
contents: read
contents: read

jobs:
build:
uses: ./.github/workflows/build_base.yml
with:
upload_artifacts: false
build:
uses: ./.github/workflows/build_base.yml
secrets: inherit
with:
upload_artifacts: false
Loading