Support MRs generated by LocalRegistry.jl
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 45/100
Direzione di ricerca
Inizia in tagbotgitlab/tagbot.py, con la regex intorno alla riga 15, poi segui il percorso della versione catturata fino a gitlabchangelog/changelog.py. Aggiorna le regex per gestire sia i body di Registrator.jl separati da newline sia i body di LocalRegistry.jl che usano
e •, e verifica che entrambi i formati producano una versione valida per il parsing del changelog.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
A few months ago, LocalRegistry.jl added the option of generating GitLab Merge Requests (MRs) to a PackageRegistry (https://github.com/GunnarFarneback/LocalRegistry.jl/pull/49).
However the generated MRs have a body/description with the following format:
• Registering package: Example<br>• Repository: gitlab.foo.com/foo/bar<br>• Version: v0.1.2<br>• Commit: abcdef<br>• Triggered by: @john.doe<br>
We can see the fields are not separated by newline characters, but instead by <br> HTML elements. This is to workaround the fact that the MR is created via git push options and newlines are not supported there (there is a mention of this in that LocalRegistry MR https://github.com/GunnarFarneback/LocalRegistry.jl/pull/49).
TagBotGitLab fails to parse such MR body, with the following error:
Traceback (most recent call last):
File "/var/task/tagbotgitlab/tagbot.py", line 32, in handler
status, msg = 200, handle_event(json.loads(evt.get("body", "
{}
")))
File "/var/task/tagbotgitlab/tagbot.py", line 56, in handle_event
return handle_merge(payload)
File "/var/task/tagbotgitlab/tagbot.py", line 124, in handle_merge
release_notes = changelog.get(version, commit)
File "/var/task/gitlabchangelog/changelog.py", line 238, in get
data = self._collect_data(version, sha)
File "/var/task/gitlabchangelog/changelog.py", line 183, in _collect_data
previous = self._previous_release(version)
File "/var/task/gitlabchangelog/changelog.py", line 74, in _previous_release
cur_ver = semver.VersionInfo.parse(_strip_starting_v(version))
File "/var/task/semver.py", line 726, in parse
raise ValueError("%s is not valid SemVer string" % version)
ValueError: 0.1.2<br>• Commit: abcdef<br>• Triggered by: @john.doe<br> is not valid SemVer string
i.e. it believes the version string is 0.1.2<br>• Commit: abcdef<br>• Triggered by: @john.doe<br>, since the regex matches all characters until the end of line. Passing that string to semver.VersionInfo.parse rightfully produces an error.
We should change the regexes to support MRs generated both by Registrator.jl (containing newlines) and LocalRegistry.jl (containing <br> and •).
I'll submit a PR for this soon.
- Lingua principale
- Python
- Stelle
- 6
- Fork
- 3
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di invenia/TagBotGitLab
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
invenia/TagBotGitLab#14 ·
Tutte le issue di invenia/TagBotGitLab
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
-
[Bug]: Queen's own Ollama model loses num_ctx when a running session switches to itForse già presa @anasamin26 l’ha presa oggi. Apertabug enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
aden-hive/hive#7508 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
llm translation
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
BerriAI/litellm#47884 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
bug 🐛
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
netalertx/NetAlertX#1856 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno