File tree Expand file tree Collapse file tree 1 file changed +18
-16
lines changed Expand file tree Collapse file tree 1 file changed +18
-16
lines changed Original file line number Diff line number Diff line change @@ -12,22 +12,6 @@ $headers = @{
12
12
" User-Agent" = " PowerShell-GitHub-Action"
13
13
}
14
14
15
- if ($deleteType -eq " tag" ) {
16
- $url = " https://api.github.com/repos/$owner /$repo /git/refs/tags"
17
- DeleteTags
18
- } elseif ($deleteType -eq " release" ) {
19
- $url = " https://api.github.com/repos/$owner /$repo /releases"
20
- DeleteReleases
21
- } elseif ($deleteType -eq " tr" ) {
22
- $urlTags = " https://api.github.com/repos/$owner /$repo /git/refs/tags"
23
- DeleteTags
24
- $urlReleases = " https://api.github.com/repos/$owner /$repo /releases"
25
- DeleteReleases
26
- } else {
27
- Write-Host " Invalid delete type. Please enter 'tag', 'release', or 'tr'."
28
- Exit
29
- }
30
-
31
15
function DeleteTags {
32
16
$response = Invoke-RestMethod - Uri $urlTags - Headers $headers - Method Get
33
17
@@ -55,3 +39,21 @@ function DeleteReleases {
55
39
}
56
40
}
57
41
}
42
+
43
+
44
+ if ($deleteType -eq " tag" ) {
45
+ $url = " https://api.github.com/repos/$owner /$repo /git/refs/tags"
46
+ DeleteTags
47
+ } elseif ($deleteType -eq " release" ) {
48
+ $url = " https://api.github.com/repos/$owner /$repo /releases"
49
+ DeleteReleases
50
+ } elseif ($deleteType -eq " tr" ) {
51
+ $urlTags = " https://api.github.com/repos/$owner /$repo /git/refs/tags"
52
+ DeleteTags
53
+ $urlReleases = " https://api.github.com/repos/$owner /$repo /releases"
54
+ DeleteReleases
55
+ } else {
56
+ Write-Host " Invalid delete type. Please enter 'tag', 'release', or 'tr'."
57
+ Exit
58
+ }
59
+
You can’t perform that action at this time.
0 commit comments