Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 9 additions & 1 deletion .github/skills/dev/pr-reviews/fetch-review-threads/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ metadata:
related-artifacts:
- .github/skills/dev/pr-reviews/fetch-review-threads/scripts/get-pr-review-threads.sh
- .github/skills/dev/pr-reviews/fetch-review-threads/scripts/list-unresolved-threads.sh
- .github/skills/dev/pr-reviews/fetch-review-threads/scripts/show-unresolved-thread-bodies.sh
---

# Fetching PR Review Threads
Expand Down Expand Up @@ -55,15 +56,22 @@ Use GitHub CLI if you need to retrieve threads directly from the terminal.
## Available Scripts

- `scripts/get-pr-review-threads.sh` - Fetches review threads into a JSON file.
- `scripts/list-unresolved-threads.sh` - Emits unresolved threads as JSON lines.
- `scripts/list-unresolved-threads.sh` - Emits unresolved threads as compact JSON lines (ID, path, URL). Use for triage and tracking.
- `scripts/show-unresolved-thread-bodies.sh` - Prints full thread details including comment bodies in human-readable form. Use to read suggestions before deciding.

Recommended usage:

```bash
# 1. Fetch all threads once
bash scripts/get-pr-review-threads.sh \
--pr-number 1707 \
--output-file /tmp/pr_threads_1707.json

# 2. Read full suggestion bodies
bash scripts/show-unresolved-thread-bodies.sh \
--threads-file /tmp/pr_threads_1707.json

# 3. Get compact IDs/paths for tracker population
bash scripts/list-unresolved-threads.sh \
--threads-file /tmp/pr_threads_1707.json
```
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
#!/usr/bin/env bash

set -euo pipefail

usage() {
cat <<'EOF'
Usage: show-unresolved-thread-bodies.sh --threads-file <path>

Print the full details of each unresolved review thread, including comment bodies.
Use this after running get-pr-review-threads.sh to read Copilot (or other reviewer)
suggestions before triaging them.

Options:
--threads-file <path> Path to review threads JSON file written by
get-pr-review-threads.sh (required)
-h, --help Show this help

Output format (human-readable):
=== Thread <id> ===
Path: <file path>
Outdated: <true|false>
URL: <comment url>
Author: <login>
Body:
<comment body>
---
EOF
}

THREADS_FILE=""

while [[ $# -gt 0 ]]; do
case "$1" in
--threads-file)
THREADS_FILE=${2:-}
shift 2
;;
-h|--help)
usage
exit 0
;;
*)
echo "Error: unknown argument '$1'." >&2
usage >&2
exit 2
;;
esac
done

if [[ -z "${THREADS_FILE}" ]]; then
echo "Error: --threads-file is required." >&2
usage >&2
exit 2
fi

if [[ ! -f "${THREADS_FILE}" ]]; then
echo "Error: file not found: ${THREADS_FILE}" >&2
exit 2
fi

jq -r '
.data.repository.pullRequest.reviewThreads.nodes[]
| select(.isResolved == false)
| "=== Thread \(.id) ===",
"Path: \(.path)",
"Outdated: \(.isOutdated)",
(.comments.nodes[]
| "URL: \(.url)",
"Author: \(.author.login)",
"Body:",
.body,
"---"
)
' "${THREADS_FILE}"
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ metadata:
- docs/templates/COPILOT-SUGGESTIONS-TEMPLATE.md
- .github/skills/dev/pr-reviews/fetch-review-threads/scripts/get-pr-review-threads.sh
- .github/skills/dev/pr-reviews/fetch-review-threads/scripts/list-unresolved-threads.sh
- .github/skills/dev/pr-reviews/fetch-review-threads/scripts/show-unresolved-thread-bodies.sh
- .github/skills/dev/pr-reviews/resolve-review-threads/scripts/resolve-all-unresolved-threads.sh
---

Expand Down Expand Up @@ -61,7 +62,14 @@ This saves all review threads (resolved, unresolved, outdated) to `/tmp/pr_threa

### 3. Populate the Tracker

Extract unresolved threads from the JSON:
Read the full suggestion bodies to understand each thread:

```bash
bash ../fetch-review-threads/scripts/show-unresolved-thread-bodies.sh \
--threads-file /tmp/pr_threads_<PR_NUMBER>.json
```

Then extract the compact list for populating the tracker table:

```bash
bash ../fetch-review-threads/scripts/list-unresolved-threads.sh \
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ jobs:
cargo publish -p bittorrent-tracker-core
cargo publish -p bittorrent-udp-tracker-core
cargo publish -p bittorrent-udp-tracker-protocol
cargo publish -p torrust-axum-health-check-api-server
cargo publish -p torrust-axum-http-tracker-server
cargo publish -p torrust-axum-rest-tracker-api-server
cargo publish -p torrust-axum-server
cargo publish -p torrust-rest-tracker-api-client
cargo publish -p torrust-rest-tracker-api-core
cargo publish -p torrust-torrust-server-lib
cargo publish -p torrust-tracker-axum-health-check-api-server
cargo publish -p torrust-tracker-axum-http-server
cargo publish -p torrust-tracker-axum-rest-api-server
cargo publish -p torrust-tracker-axum-server
cargo publish -p torrust-tracker-rest-api-client
cargo publish -p torrust-tracker-rest-api-core
cargo publish -p torrust-server-lib
cargo publish -p torrust-tracker
cargo publish -p torrust-tracker-client
cargo publish -p torrust-tracker-clock
Expand All @@ -79,5 +79,5 @@ jobs:
cargo publish -p torrust-tracker-primitives
cargo publish -p torrust-tracker-swarm-coordination-registry
cargo publish -p torrust-tracker-test-helpers
cargo publish -p torrust-tracker-torrent-benchmarking
cargo publish -p torrust-udp-tracker-server
cargo publish -p torrust-tracker-torrent-repository-benchmarking
cargo publish -p torrust-tracker-udp-server
14 changes: 7 additions & 7 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ All packages live under `packages/`. The workspace version is `3.0.0-develop`.

| Package | Crate Name | Prefix / Layer | Description |
| --------------------------------- | ------------------------------------------------- | -------------- | ---------------------------------------------- |
| `axum-health-check-api-server` | `torrust-axum-health-check-api-server` | `axum-*` | Health monitoring endpoint |
| `axum-http-tracker-server` | `torrust-axum-http-tracker-server` | `axum-*` | BitTorrent HTTP tracker server (BEP 3/23) |
| `axum-rest-tracker-api-server` | `torrust-axum-rest-tracker-api-server` | `axum-*` | Management REST API server |
| `axum-server` | `torrust-axum-server` | `axum-*` | Base Axum HTTP server infrastructure |
| `axum-health-check-api-server` | `torrust-tracker-axum-health-check-api-server` | `axum-*` | Health monitoring endpoint |
| `axum-http-tracker-server` | `torrust-tracker-axum-http-server` | `axum-*` | BitTorrent HTTP tracker server (BEP 3/23) |
| `axum-rest-tracker-api-server` | `torrust-tracker-axum-rest-api-server` | `axum-*` | Management REST API server |
| `axum-server` | `torrust-tracker-axum-server` | `axum-*` | Base Axum HTTP server infrastructure |
| `clock` | `torrust-tracker-clock` | utilities | Mockable time source for deterministic testing |
| `configuration` | `torrust-tracker-configuration` | domain | Config file parsing, environment variables |
| `events` | `torrust-tracker-events` | domain | Domain event definitions |
Expand All @@ -73,8 +73,8 @@ All packages live under `packages/`. The workspace version is `3.0.0-develop`.
| `metrics` | `torrust-tracker-metrics` | domain | Prometheus metrics integration |
| `peer-id` | `bittorrent-peer-id` | domain | Peer ID parsing and formatting utilities |
| `primitives` | `torrust-tracker-primitives` | domain | Core domain types (InfoHash, PeerId, ...) |
| `rest-tracker-api-client` | `torrust-rest-tracker-api-client` | client tools | REST API client library |
| `rest-tracker-api-core` | `torrust-rest-tracker-api-core` | client tools | REST API core logic |
| `rest-tracker-api-client` | `torrust-tracker-rest-api-client` | client tools | REST API client library |
| `rest-tracker-api-core` | `torrust-tracker-rest-api-core` | client tools | REST API core logic |
| `server-lib` | `torrust-server-lib` | shared | Shared server library utilities |
| `swarm-coordination-registry` | `torrust-tracker-swarm-coordination-registry` | domain | Torrent/peer coordination registry |
| `test-helpers` | `torrust-tracker-test-helpers` | utilities | Mock servers, test data generation |
Expand All @@ -83,7 +83,7 @@ All packages live under `packages/`. The workspace version is `3.0.0-develop`.
| `tracker-core` | `bittorrent-tracker-core` | `*-core` | Central tracker peer-management logic |
| `udp-protocol` | `bittorrent-udp-tracker-protocol` | `*-protocol` | UDP tracker protocol (BEP 15) framing/parsing |
| `udp-tracker-core` | `bittorrent-udp-tracker-core` | `*-core` | UDP-specific tracker domain logic |
| `udp-tracker-server` | `torrust-udp-tracker-server` | server | UDP tracker server implementation |
| `udp-tracker-server` | `torrust-tracker-udp-server` | server | UDP tracker server implementation |

**Console tools** (under `console/`):

Expand Down
Loading
Loading