GeezerVison is showing github.com — Allow dots in repo names in get-repo-info, fix test cleanup of drafts · openlogix/.github@44164f3
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: .github/workflows/actions-test.yaml +6-2Lines changed: 6 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -412,7 +412,9 @@ jobs: |
412 | 412 | --jq '.[].tagName | select(startswith("test-"))' | |
413 | 413 | while read -r tag; do |
414 | 414 | echo "Deleting $tag" |
415 | | - gh release delete "$tag" --yes --cleanup-tag |
| 415 | + gh release delete "$tag" --yes |
| 416 | + # A draft has no tag, so the tag is deleted separately. |
| 417 | + gh api -X DELETE "repos/$GH_REPO/git/refs/tags/$tag" 2>/dev/null || true |
416 | 418 | done |
417 | 419 |
|
418 | 420 | - name: Create the release files |
@@ -542,5 +544,7 @@ jobs: |
542 | 544 | --jq '.[].tagName | select(startswith(env.TAG))' | |
543 | 545 | while read -r tag; do |
544 | 546 | echo "Deleting $tag" |
545 | | - gh release delete "$tag" --yes --cleanup-tag |
| 547 | + gh release delete "$tag" --yes |
| 548 | + # A draft has no tag, so the tag is deleted separately. |
| 549 | + gh api -X DELETE "repos/$GH_REPO/git/refs/tags/$tag" 2>/dev/null || true |
546 | 550 | done |
Collapse file
Copy file name to clipboardExpand all lines: actions/get-repo-info/action.yaml +2-1Lines changed: 2 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
|
37 | 37 | fi |
38 | 38 |
|
39 | 39 | # Get origin repo name normalized to lower case (e.g. "openlogix/logix-ide") |
| 40 | + # Repo names may contain dots (e.g. ".github", "openlogix.github.io"). |
40 | 41 | origin=$(git -C "$repo_dir" remote get-url origin) |
41 | | - if [[ "$origin" =~ ^https://github\.com/([^/]+)/([^/.]+)(\.git)?$ ]]; then |
| 42 | + if [[ "${origin%.git}" =~ ^https://github\.com/([^/]+)/([^/]+)$ ]]; then |
42 | 43 | repo="${BASH_REMATCH[1]}/${BASH_REMATCH[2]}" |
43 | 44 | else |
44 | 45 | echo "Error: origin must be https://github.com/owner/repo[.git]: $origin" |
|