Skip to content
Snippets Groups Projects
Commit f007146a authored by Allan Blanchard's avatar Allan Blanchard
Browse files

Merge branch 'feature/changelog-gitlab-sub-repos-issues' into 'master'

Support frama-c/<repo>#NN format

See merge request !91
parents e8715c03 3ca161be
No related branches found
No related tags found
1 merge request!91Support frama-c/<repo>#NN format
Pipeline #30940 passed
No preview for this file type
......@@ -40,9 +40,9 @@ let print_word fmt = function
| PrivateBts n ->
Format.fprintf fmt "<a class=\"private\" href=\"%s%d\">#%d</a>"
"http://bts.frama-c.com/view.php?id=" n n
| Gitlab n ->
Format.fprintf fmt "<a class=\"private\" href=\"%s%d\">#%d</a>"
"https://git.frama-c.com/frama-c/frama-c/issues/" n n
| Gitlab(pub, s, n) ->
Format.fprintf fmt "<a class=\"private\" href=\"%s/%s/%s/%s/%d\">#%d</a>"
"https://git.frama-c.com" (if pub then "pub" else "frama-c") s "issues" n n
| OldBts n ->
Format.fprintf fmt "<code>'%d'</code>" n
......
......@@ -26,7 +26,7 @@
| PublicBts of int
| PrivateBts of int
| OldBts of int
| Gitlab of int
| Gitlab of bool * string * int
| Item of char
| Space
| Newline
......@@ -43,6 +43,7 @@
"ACSL";
"Cil";
"Configure";
"Dev";
"Doc";
"Journal";
"Kernel";
......@@ -176,6 +177,9 @@ and text e = parse
(* | space+ (digit as k) ')' { add_word e (Item k) ; text e lexbuf } *)
| "frama-c/" ((letter+) as sub) '#' ((digit+) as bug)
{ add_word e (Gitlab(false, sub, int_of_string bug)) ; text e lexbuf }
| '#' ((digit+) as bug)
{ add_word e (PublicBts(int_of_string bug)) ; text e lexbuf }
......@@ -186,7 +190,10 @@ and text e = parse
{ add_word e (OldBts(int_of_string bug)) ; text e lexbuf }
| "#@" ((digit+) as bug)
{ add_word e (Gitlab(int_of_string bug)) ; text e lexbuf }
{ add_word e (Gitlab(false, "frama-c", int_of_string bug)) ; text e lexbuf }
| "##" ((digit+) as bug)
{ add_word e (Gitlab(true, "frama-c", int_of_string bug)) ; text e lexbuf }
| '-' (letter | '-')+
| '!'? (upper ident* '.')+ ident+
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment