merge-try-google-books-api-for-book-identification-by-isbn #7

Merged
0Ry5 merged 3 commits from try-google-books-api-for-book-identification-by-isbn into main 2024-09-13 19:39:59 +02:00
2 changed files with 1 additions and 80 deletions
Showing only changes of commit af569cbde6 - Show all commits

View file

@ -47,7 +47,7 @@ else:
OWNER,
REPO,
body=CreatePullRequestOption(
base=branchName, head="main", title="merge" + branchName
base="main", head=branchName, title="merge-" + branchName
),
client=client,
).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