Initial commit
This commit is contained in:
Executable
+15
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
HOST="gitea.dadeschools.net"
|
||||
API="https://$HOST/api/v1"
|
||||
ORG="Contractor"
|
||||
REPO="Timesheet"
|
||||
ISSUE_NUM=$1
|
||||
|
||||
CREDS=$(printf "host=%s\nprotocol=https\n\n" "$HOST" | git credential fill)
|
||||
USER=$(printf '%s\n' "$CREDS" | sed -n 's/^username=//p')
|
||||
PASS=$(printf '%s\n' "$CREDS" | sed -n 's/^password=//p')
|
||||
|
||||
AUTH=(-u "$USER:$PASS")
|
||||
PAYLOAD='{"state": "closed"}'
|
||||
|
||||
curl -sSL -X PATCH "${AUTH[@]}" -H "Content-Type: application/json" -d "$PAYLOAD" "$API/repos/$ORG/$REPO/issues/$ISSUE_NUM"
|
||||
Reference in New Issue
Block a user