You've already forked docker-hub-description-updater
							
							fix(pkg/hub): url encoded body
This commit is contained in:
		
							
								
								
									
										7
									
								
								test.sh
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								test.sh
									
									
									
									
									
								
							| @@ -5,10 +5,6 @@ IFS=$'\n\t' | ||||
| # Set the default path to README.md | ||||
| README_FILEPATH=${README_FILEPATH:="./README.md"} | ||||
|  | ||||
| DOCKERHUB_PASSWORD=${DOCKER_PASSWORD} | ||||
| DOCKERHUB_USERNAME=volkerraschek | ||||
| DOCKERHUB_REPOSITORY=volkerraschek/dhd | ||||
|  | ||||
| # Acquire a token for the Docker Hub API | ||||
| echo "Acquiring token" | ||||
| LOGIN_PAYLOAD="{\"username\": \"${DOCKERHUB_USERNAME}\", \"password\": \"${DOCKERHUB_PASSWORD}\"}" | ||||
| @@ -16,8 +12,7 @@ TOKEN=$(curl -H "Content-Type: application/json" -X POST -d ${LOGIN_PAYLOAD} htt | ||||
|  | ||||
| # Send a PATCH request to update the description of the repository | ||||
| echo "Sending PATCH request" | ||||
| # REPO_URL="https://hub.docker.com/v2/repositories/${DOCKERHUB_REPOSITORY}/" | ||||
| REPO_URL="https://httpbin.org/patch" | ||||
| REPO_URL="https://hub.docker.com/v2/repositories/${DOCKERHUB_REPOSITORY}/" | ||||
| RESPONSE_CODE=$(curl --write-out %{response_code} -H "Authorization: JWT ${TOKEN}" -X PATCH --data-urlencode full_description@${README_FILEPATH} ${REPO_URL}) | ||||
| echo "Received response code: $RESPONSE_CODE" | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user