From 2955b5f2c246a9e4d774bdc02df93b06706229da Mon Sep 17 00:00:00 2001 From: Sudo-Ivan Date: Sat, 3 Jan 2026 21:56:47 -0600 Subject: [PATCH] chore(post_bench_results.sh): remove obsolete script for posting benchmark results --- scripts/post_bench_results.sh | 46 ----------------------------------- scripts/post_ci_results.sh | 0 2 files changed, 46 deletions(-) delete mode 100755 scripts/post_bench_results.sh mode change 100644 => 100755 scripts/post_ci_results.sh diff --git a/scripts/post_bench_results.sh b/scripts/post_bench_results.sh deleted file mode 100755 index 218ea95..0000000 --- a/scripts/post_bench_results.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash -set -e - -# Required environment variables: -# GITEA_TOKEN -# GITHUB_REPOSITORY -# GITHUB_EVENT_PATH - -if [ -z "$GITEA_TOKEN" ]; then - echo "GITEA_TOKEN is not set. Skipping PR comment." - exit 0 -fi - -if [ ! -f "bench_results.txt" ]; then - echo "bench_results.txt not found. Nothing to post." - exit 0 -fi - -# Extract PR number from the event JSON -PR_NUMBER=$(jq -r '.pull_request.number' "$GITHUB_EVENT_PATH") - -if [ "$PR_NUMBER" == "null" ]; then - echo "Not a pull request. Skipping." - exit 0 -fi - -# Filter out progress lines to keep the comment clean -grep -v "Progress:" bench_results.txt > bench_filtered.txt || true - -# Construct the message -HEADER="### Benchmark and Integrity Results (automated report)" -RESULTS=$(cat bench_filtered.txt) - -# Use jq to construct the JSON payload safely -JSON_PAYLOAD=$(jq -n \ - --arg results "$RESULTS" \ - --arg header "$HEADER" \ - '{body: ($header + "\n\n```text\n" + $results + "\n```"), event: "COMMENT"}') - -# Post to Gitea -curl -f -X POST \ - -H "Authorization: token $GITEA_TOKEN" \ - -H "Content-Type: application/json" \ - -d "$JSON_PAYLOAD" \ - "https://git.quad4.io/api/v1/repos/${GITHUB_REPOSITORY}/pulls/${PR_NUMBER}/reviews" - diff --git a/scripts/post_ci_results.sh b/scripts/post_ci_results.sh old mode 100644 new mode 100755