add debug output to pr creation
This commit is contained in:
@@ -98,7 +98,8 @@ jobs:
|
|||||||
api="https://gitea.unrail.xyz/api/v1/repos/thomas/nixos-config"
|
api="https://gitea.unrail.xyz/api/v1/repos/thomas/nixos-config"
|
||||||
branch="bot/handy-${{ steps.update.outputs.version }}"
|
branch="bot/handy-${{ steps.update.outputs.version }}"
|
||||||
|
|
||||||
existing=$(curl -fsS \
|
echo "Checking for existing PRs..."
|
||||||
|
existing=$(curl -sS \
|
||||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||||
"${api}/pulls?state=open" \
|
"${api}/pulls?state=open" \
|
||||||
| python -c 'import json,sys; d=json.load(sys.stdin); b="'"$branch"'"; print(next((str(pr["number"]) for pr in d if pr.get("head",{}).get("ref")==b), ""))')
|
| python -c 'import json,sys; d=json.load(sys.stdin); b="'"$branch"'"; print(next((str(pr["number"]) for pr in d if pr.get("head",{}).get("ref")==b), ""))')
|
||||||
@@ -108,7 +109,8 @@ jobs:
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
curl -fsS -X POST \
|
echo "Creating PR..."
|
||||||
|
curl -sS -X POST \
|
||||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
"${api}/pulls" \
|
"${api}/pulls" \
|
||||||
|
|||||||
Reference in New Issue
Block a user