Skip to content

Commit 3717b60

Browse files
authored
Merge pull request #50 from self-five/xml-glitch
Add better commit extraction logic to handle gnu.org glitches
2 parents 4a835c8 + 97cc525 commit 3717b60

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

versions.sh

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,12 @@ for version in "${versions[@]}"; do
6868
| jq -r '
6969
.feed.entry[]
7070
| (
71-
.id
72-
| if startswith("urn:sha1:") then
73-
# cgit
74-
ltrimstr("urn:sha1:")
75-
elif contains(":Commit/") then
76-
# github
77-
sub("^.*:Commit/"; "")
78-
else null end
71+
"[0-9a-f]{40}" as $commitRegex
72+
| "(^|[:/=])(?<commit>\($commitRegex))([&/:]|$)" as $captureRegex
73+
| (.id | capture($captureRegex))
74+
// (.link."+@href" | capture($captureRegex))
75+
// {}
76+
| .commit
7977
) as $commit
8078
| select(
8179
$commit

0 commit comments

Comments
 (0)