Github packages
- The query below returns a list of all packages and package versions pushed to github repo of Ampersand
- The packages api is still in development, therefore you must include a HTTP Accept header to indicate you want to use this feature
- Make sure the right access right are set for your personal access token. Inluding read repo + read/write packages
POST https://api.github.com/graphql
headers: >
Content-Type: application/json
Authorization: bearer [put your personal access token here]
Accept: application/vnd.github.packages-preview+json
body (grapql query):
{"query": "query {viewer { login }repository(name: \"ampersand\", owner: \"ampersandtarski\") {idpackages (first: 10) {nodes {idnameversions (first: 100) {nodes {id version}}}}}}"}
NOTE! Doesn't work with public packages, like we have
POST https://api.github.com/graphql
headers: >
Content-Type: application/json
Authorization: bearer [put your personal access token here]
Accept: application/vnd.github.package-deletes-preview+json
body (graphql query) >
{ "query" : "mutation { deletePackageVersion(input:{packageVersionId:\"[package-version-id]==\"}) { success }}" }
Last modified 3yr ago