Skip to content

Commit

Permalink
Update pkgs-delete.yml (#920)
Browse files Browse the repository at this point in the history
* Update pkgs-delete.yml

* Update .github/workflows/pkgs-delete.yml

* Update .github/workflows/pkgs-delete.yml
  • Loading branch information
shargon authored Feb 20, 2024
1 parent 8f99a18 commit 6d1325e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/pkgs-delete.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
import os
def get_versions(feed, package_name, api_key):
url = f"https://www.myget.org/F/neo/api/v2/Packages?$filter=Id eq '{package_name}'&$format=json"
url = f"https://www.myget.org/F/{feed}/api/v2/Packages?$filter=Id eq '{package_name}'&$format=json"
headers = {'Accept': 'application/json'}
response = requests.get(url, headers=headers)
if response.status_code == 200:
Expand All @@ -42,9 +42,9 @@ jobs:
return []
def delete_version(feed, package_name, ver, api_key):
delete_url = f"https://www.myget.org/F/{feed}/api/v2/package/{package_name}/{ver}"
headers = {"X-MyGet-ApiKey": api_key}
response = requests.delete(delete_url, headers=headers)
url = f"https://www.myget.org/F/{feed}/api/v2/package/{package_name}/{ver}?hardDelete=true"
headers = {"X-NuGet-ApiKey": api_key}
response = requests.delete(url, headers=headers)
return response.status_code == 204 # 204 No Content, success
feed = os.environ['MYGET_FEED']
Expand Down

0 comments on commit 6d1325e

Please sign in to comment.