Open emmeowzing opened 1 year ago
quick and dirty POC using an ssh remote url and jq:
curl -Ss --header "PRIVATE-TOKEN: <TOKEN>" "https://$(git remote get-url origin | sed 's/git@//;s/:.*//')/api/v4/projects/$(git remote get-url origin | sed 's/\.git//;s/.*://;s|/|%2F|g')" | jq .id
We already request users provide a key. I wonder if we can just query the gitlab instance's API and check for the project's ID automatically and drop that requirement.