remove shell script

This commit is contained in:
0ry5 2024-09-13 19:00:18 +02:00
parent dfb8ffb94b
commit af569cbde6
2 changed files with 1 additions and 80 deletions

View file

@ -47,7 +47,7 @@ else:
OWNER, OWNER,
REPO, REPO,
body=CreatePullRequestOption( body=CreatePullRequestOption(
base=branchName, head="main", title="merge" + branchName base="main", head=branchName, title="merge-" + branchName
), ),
client=client, client=client,
).content ).content

View file

@ -1,79 +0,0 @@
source './.env'
PASSED_ISSUE=''
while test $# -gt 0; do
case "$1" in
-i|--issue)
shift
if test $# -gt 0
then
export PASSED_ISSUE=$1
fi
shift
;;
-h|--help) print_usage ;;
*) print_usage
break
;;
esac
done
if [[ -z $PASSED_ISSUE ]]
then
echo -e "missing issue; use -i \e[3missue\e[0m"
exit 1
fi
printf "\n"
ISSUES=$(curl -X 'GET' \
'https://git.n39.eu/api/v1/repos/'$OWNER'/'$REPO'/issues' \
-H 'accept: application/json' | tr ' ' -)
printf "\n"
echo $ISSUES
ISSUE=$(jq '.[] | select(.title|test("'$PASSED_ISSUE'"))' <<< $ISSUES)
printf "\n"
echo $ISSUE
NAME=$(jq '.title' <<< $ISSUE)
printf "\n"
echo $NAME
BRANCH=$(curl -X 'POST' 'https://git.n39.eu/api/v1/repos/'$OWNER'/'$REPO'/branches' \
-H "accept: application/json" \
-H 'Authorization: token '${FORJEGO_ACCESS_TOKEN} \
-H "Content-Type: application/json" -d '{"new_branch_name": '$NAME', "old_branch_name": "main"}' -i)
echo $BRANCH
USER=$(git config --global user.name)
MR=$(curl -X 'POST' 'https://git.n39.eu/api/v1/repos/'$OWNER'/'$REPO'/pulls' \
-H "accept: application/json" \
-H 'Authorization: token '${FORJEGO_ACCESS_TOKEN} \
-H "Content-Type: application/json" -d '{
"assignee": "'$USER'",
"assignees": [
"string"
],
"base": "string",
"body": "string",
"head": "string",
"labels": [
0
],
"milestone": 0,
"title": "string"
}' -i)
USER=$(git checkout $BRANCH)
#git browse -- issues
#git checkout -b ''
#git push -o merge_request.create origin my-branch