ci(pr): pipe PR payload to curl instead of writing /tmp/pr.json
PR — Ouverture automatique / create-pr (push) Successful in 3s
PR — Ouverture automatique / create-pr (push) Successful in 3s
This commit is contained in:
@@ -40,15 +40,13 @@ jobs:
|
||||
exit 0
|
||||
fi
|
||||
|
||||
python3 - "$BRANCH" "$title" "$body" <<'PY' > /tmp/pr.json
|
||||
python3 - "$BRANCH" "$title" "$body" <<'PY' | curl -fsS -X POST \
|
||||
-H "Authorization: token $GITEA_TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
--data-binary @- \
|
||||
"$API/repos/$REPO/pulls"
|
||||
import json, sys
|
||||
branch, title, body = sys.argv[1], sys.argv[2], sys.argv[3]
|
||||
print(json.dumps({"base": "main", "head": branch, "title": title, "body": body}))
|
||||
PY
|
||||
|
||||
curl -fsS -X POST \
|
||||
-H "Authorization: token $GITEA_TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
--data @/tmp/pr.json \
|
||||
"$API/repos/$REPO/pulls"
|
||||
echo "PR créée."
|
||||
|
||||
Reference in New Issue
Block a user