Skip to content

Commit 08e31f4

Browse files
Merge branch 'trunk' into release for version 2.5.0
2 parents 2a81795 + 1f583c0 commit 08e31f4

73 files changed

Lines changed: 1566 additions & 1183 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.builds/alpine.yml

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,23 @@ image: alpine/edge
22
packages:
33
- libcurl
44
- gcc
5-
- autoconf
6-
- automake
7-
- libtool
85
- make
96
- pkgconf
107
- musl-dev
118
- curl-dev
129
- flex
1310
- bison
14-
- xz
15-
- gzip
16-
- bzip2
1711
- libbsd-dev
1812
- kyua
1913
- atf-dev
14+
- libedit-dev
2015
sources:
2116
- https://git.sr.ht/~herrhotzenplotz/gcli
2217
tasks:
2318
- build: |
2419
cd gcli
25-
./autogen.sh
26-
{
27-
CFLAGS='-std=c99 -pedantic -Wall -Wextra -Werror' \
28-
CPPFLAGS='-D_XOPEN_SOURCE=600' \
29-
./configure --disable-silent-rules || (cat config.log && exit 42)
30-
}
31-
make -j
20+
./configure --debug
21+
make -j all
3222
- check: |
3323
cd gcli
34-
make -j distcheck
24+
make -j check

.builds/debian-stable.yml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
image: debian/stable
22
packages:
33
- build-essential
4+
- libssl-dev
45
- libcurl4-openssl-dev
56
- pkgconf
6-
- autotools-dev
77
- bison
88
- flex
99
- make
10-
- autoconf
11-
- automake
1210
- libtool
1311
- libbsd-dev
1412
- libatf-dev kyua
@@ -17,13 +15,9 @@ sources:
1715
tasks:
1816
- build: |
1917
cd gcli
20-
./autogen.sh
21-
{
22-
CFLAGS='-std=c99 -pedantic -Wall -Wextra -Werror' \
23-
CPPFLAGS='-D_XOPEN_SOURCE=600' \
24-
./configure --disable-silent-rules || (cat config.log && exit 42)
25-
}
26-
make
18+
./configure --debug
19+
make -j 4 all
2720
- check: |
2821
cd gcli
29-
make distcheck
22+
./configure --debug
23+
make -j 4 check

.builds/freebsd.yml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
image: freebsd/14.x
22
packages:
33
- atf
4-
- autoconf
5-
- automake
64
- ca_root_nss
75
- curl
86
- kyua
97
- libedit
108
- libssh2
119
- libtool
1210
- libunistring
13-
- m4
1411
- pkg
1512
- pkgconf
1613
- readline
@@ -19,15 +16,10 @@ sources:
1916
tasks:
2017
- build: |
2118
cd gcli
22-
./autogen.sh
23-
{
24-
CFLAGS='-std=c99 -pedantic -Wall -Wextra -Wno-misleading-indentation -Werror' \
25-
CPPFLAGS='-D_XOPEN_SOURCE=600' \
26-
LEX=flex YACC=byacc \
27-
./configure --disable-silent-rules || (cat config.log && exit 42)
28-
}
29-
make -j 4
19+
./configure --debug
20+
make -j 4 all
3021
3122
- check: |
3223
cd gcli
33-
make -j 4 distcheck
24+
./configure --debug
25+
make -j 4 check

.gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ dist:
3737

3838
debian-amd64:
3939
stage: testing
40-
image: debian:bullseye
40+
image: debian:bookworm
4141
script:
4242
- apt-get update
4343
- apt-get install -y --no-install-recommends build-essential libcurl4-openssl-dev pkgconf bison flex make libbsd-dev libatf-dev kyua libreadline-dev libssl-dev

Changelog.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,62 @@
22

33
This changelog does not follow semantic versioning.
44

5+
## UNRELEASED
6+
7+
### Added
8+
9+
- Added a `-R` flag to the comment subcommand that allows you to
10+
reply to a comment with the given ID.
11+
12+
### Fixed
13+
14+
- In various configuration places and environment variables where
15+
boolean values are accepted you can now specify `true` as a truthy
16+
value.
17+
18+
Submitted by: Gavin-John Noonan <mail@gjnoonan.co.uk>
19+
20+
- The configure script now exits gracefully whenever a required
21+
program couldn't be found.
22+
23+
Reported by: Alexey Ugnichev <alexey.ugnichev@gmail.com>
24+
25+
- A bug genereting invalid JSON when adding labels to a GitHub issue
26+
was fixed.
27+
28+
- The reviews cache directory is now automatically created if it
29+
doesn't exist avoiding a 'No such file or directory' error when
30+
invoking the review action for the first time.
31+
32+
Reported by: Bence Ferdinandy <bence@ferdinandy.com>
33+
34+
- A few bugs in the patch parser have been fixed:
35+
36+
- Under rare conditions hunk ranges were incorrectly parsed
37+
- Parser errors when a diff included lines starting with a backslash
38+
(e.g. when there is no newline at the end of file) were fixed
39+
40+
Reported by: Bence Ferdinandy <bence@ferdinandy.com>
41+
42+
- The installation location of the manual pages of gcli has been
43+
fixed. The latest release accidentially installed manual pages to
44+
`${DESTDIR}${PREFIX}/share/man` instead of
45+
`${DESTDIR}${PREFIX}/share/man/manX`.
46+
47+
Reported by: Bence Ferdinandy <bence@ferdinandy.com>
48+
49+
### Changed
50+
51+
- The pipelines subcommand has been refactored to accept actions
52+
for pipelines. This allows cases where a pipeline triggers child
53+
pipelines to be handled properly.
54+
55+
See `gcli-pipelines(1)` for documentation.
56+
57+
Reported by: Bence Ferdinandy <bence@ferdinandy.com>
58+
59+
### Removed
60+
561
## 2.4.0 (2024-June-28)
662

763
### Added

HACKING.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -211,14 +211,14 @@ Please use the BSD Style conventions for formatting your code. This means:
211211
I know we're not using punchcards anymore, however it makes the code
212212
way more readable.
213213

214-
- Use C99
214+
- Use C11
215215

216-
Please don't use C11 or even more modern features. Reason being that
216+
Please don't use C17 or even more modern features. Reason being that
217217
I want gcli to be portable to older platforms where either no modern
218218
compilers are available or where we have to rely on old gcc versions
219-
and/or buggy vendor compilers. Notable forbidden features are
220-
`_Static_assert` and anonymous unions. If you use the compiler flags
221-
I mentioned above you should get notified by the compiler.
219+
and/or buggy vendor compilers. This also means that GNU extensions
220+
are forbidden. If you use the compiler flags I mentioned above
221+
you should get notified by the compiler.
222222

223223
There is a `.editorconfig` included in the source code that should
224224
automatically provide you with all needed

Makefile.in

Lines changed: 53 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ COPTFLAGS_xlc_release= -qpic -qoptimize=4
3131
COPTFLAGS= $(COPTFLAGS_$(CCOM)_$(OPTIMISE))
3232
COPTFLAGS_FOR_BUILD= $(COPTFLAGS_$(CCOM_FOR_BUILD)_$(OPTIMISE))
3333

34-
CSTDFLAGS_gcc= -std=c99 -pedantic
35-
CSTDFLAGS_clang= -std=c99 -pedantic
36-
CSTDFLAGS_xlc= -qlanglvl=stdc99
34+
CSTDFLAGS_gcc= -std=c11 -pedantic
35+
CSTDFLAGS_clang= -std=c11 -pedantic
36+
CSTDFLAGS_xlc= -qlanglvl=stdc11
3737
CSTDFLAGS= $(CSTDFLAGS_$(CCOM))
3838
CSTDFLAGS_FOR_BUILD= $(CSTDFLAGS_$(CCOM_FOR_BUILD))
3939

@@ -47,10 +47,10 @@ CFLAGS_FOR_BUILD= $(CSTDFLAGS_FOR_BUILD) $(COPTFLAGS_FOR_BUILD) -I@SRCDIR@/inclu
4747

4848
############## CPPFLAGS ######################
4949
ENV_CPPFLAGS= @ENV_CPPFLAGS@
50-
CPPFLAGS= -DHAVE_CONFIG_H=1 -DHAVE_SYS_QUEUE_H=1 -DHAVE_GETOPT_H=1 -D_XOPEN_SOURCE=600 $(ENV_CPPFLAGS)
50+
CPPFLAGS= -DHAVE_CONFIG_H=1 -DHAVE_SYS_QUEUE_H=1 -DHAVE_GETOPT_H=1 -D_XOPEN_SOURCE=700 $(ENV_CPPFLAGS)
5151

5252
ENV_CPPFLAGS_FOR_BUILD= @ENV_CPPFLAGS_FOR_BUILD@
53-
CPPFLAGS_FOR_BUILD= -DHAVE_CONFIG_H -DYY_NO_UNPUT -DYY_NO_INPUT -D_XOPEN_SOURCE=600 $(ENV_CPPFLAGS_FOR_BUILD)
53+
CPPFLAGS_FOR_BUILD= -DHAVE_CONFIG_H -DYY_NO_UNPUT -DYY_NO_INPUT -D_XOPEN_SOURCE=700 $(ENV_CPPFLAGS_FOR_BUILD)
5454

5555
# CFLAGS for dependency tracking for various compilers
5656
CCDEPFLAGS_gcc= -MD -MF ${@:.o=.d}
@@ -70,19 +70,28 @@ LIBATFC_LIBS= @LIBATFC_LIBS@
7070
LIBEDIT_FOUND= @LIBEDIT_FOUND@
7171
LIBEDIT_CFLAGS_1= @LIBEDIT_CFLAGS@
7272
LIBEDIT_LIBS_1= @LIBEDIT_LIBS@
73-
LIBEDIT_CFLAGS= ${LIBEDIT_CFLAGS_$(LIBEDIT_FOUND)}
74-
LIBEDIT_LIBS= ${LIBEDIT_LIBS_$(LIBEDIT_FOUND)}
73+
LIBEDIT_CFLAGS= $(LIBEDIT_CFLAGS_$(LIBEDIT_FOUND))
74+
LIBEDIT_LIBS= $(LIBEDIT_LIBS_$(LIBEDIT_FOUND))
7575
LIBEDIT_CPPFLAGS_1= -DHAVE_LIBEDIT=1
76-
LIBEDIT_CPPFLAGS= ${LIBEDIT_CPPFLAGS_$(LIBEDIT_FOUND)}
76+
LIBEDIT_CPPFLAGS= $(LIBEDIT_CPPFLAGS_$(LIBEDIT_FOUND))
7777

7878
############## READLINE #########################################
7979
LIBREADLINE_FOUND= @LIBREADLINE_FOUND@
8080
LIBREADLINE_CFLAGS_1= @LIBREADLINE_CFLAGS@
8181
LIBREADLINE_LIBS_1= @LIBREADLINE_LIBS@
82-
LIBREADLINE_CFLAGS= ${LIBREADLINE_CFLAGS_$(LIBREADLINE_FOUND)}
83-
LIBREADLINE_LIBS= ${LIBREADLINE_LIBS_$(LIBREADLINE_FOUND)}
82+
LIBREADLINE_CFLAGS= $(LIBREADLINE_CFLAGS_$(LIBREADLINE_FOUND))
83+
LIBREADLINE_LIBS= $(LIBREADLINE_LIBS_$(LIBREADLINE_FOUND))
8484
LIBREADLINE_CPPFLAGS_1= -DHAVE_LIBREADLINE=1
85-
LIBREADLINE_CPPFLAGS= ${LIBREADLINE_CPPFLAGS_$(LIBREADLINE_FOUND)}
85+
LIBREADLINE_CPPFLAGS= $(LIBREADLINE_CPPFLAGS_$(LIBREADLINE_FOUND))
86+
87+
############## LOWDOWN #########################################
88+
LIBLOWDOWN_FOUND= @LIBLOWDOWN_FOUND@
89+
LIBLOWDOWN_CFLAGS_1= @LIBLOWDOWN_CFLAGS@
90+
LIBLOWDOWN_LIBS_1= @LIBLOWDOWN_LIBS@
91+
LIBLOWDOWN_CFLAGS= $(LIBLOWDOWN_CFLAGS_$(LIBLOWDOWN_FOUND))
92+
LIBLOWDOWN_LIBS= $(LIBLOWDOWN_LIBS_$(LIBLOWDOWN_FOUND))
93+
LIBLOWDOWN_CPPFLAGS_1= -DHAVE_LIBLOWDOWN=1
94+
LIBLOWDOWN_CPPFLAGS= $(LIBLOWDOWN_CPPFLAGS_$(LIBLOWDOWN_FOUND))
8695

8796
############## LIBCRYPTO ########################################
8897
LIBCRYPTO_CFLAGS= @LIBCRYPTO_CFLAGS@
@@ -282,11 +291,12 @@ $(TEMPLATE_HEADERS) $(TEMPLATE_SRCS): pgen
282291
gcli: libgcli.a $(GCLI_OBJS)
283292
$(CCACHE) $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o gcli \
284293
$(GCLI_OBJS) libgcli.a $(LIBCURL_LIBS) $(LIBEDIT_LIBS) \
285-
$(LIBREADLINE_LIBS) $(LIBCRYPTO_LIBS)
294+
$(LIBREADLINE_LIBS) $(LIBCRYPTO_LIBS) \
295+
$(LIBLOWDOWN_LIBS)
286296

287297
libgcli.a: $(LIBGCLI_OBJS)
288-
$(AR) -rc libgcli.a $(LIBGCLI_OBJS)
289-
$(RANLIB) libgcli.a
298+
$(CCACHE) $(AR) -rc libgcli.a $(LIBGCLI_OBJS)
299+
$(CCACHE) $(RANLIB) libgcli.a
290300

291301
$(LIBGCLI_OBJS): $(TEMPLATE_HEADERS) $(TEMPLATE_SRCS)
292302

@@ -295,6 +305,7 @@ $(LIBGCLI_OBJS): $(TEMPLATE_HEADERS) $(TEMPLATE_SRCS)
295305
@mkdir -p $$(dirname $@)
296306
$(CCACHE) $(CC) $(CFLAGS) $(CCDEPFLAGS) $(CPPFLAGS) \
297307
$(LIBCURL_CFLAGS) $(LIBCRYPTO_CFLAGS) \
308+
$(LIBLOWDOWN_CFLAGS) $(LIBLOWDOWN_CPPFLAGS) \
298309
-DIN_LIBGCLI=1 -c -o $@ $<
299310

300311
.c.gcli.o:
@@ -303,6 +314,7 @@ $(LIBGCLI_OBJS): $(TEMPLATE_HEADERS) $(TEMPLATE_SRCS)
303314
$(LIBEDIT_CPPFLAGS) $(LIBREADLINE_CPPFLAGS) \
304315
$(LIBCURL_CFLAGS) $(LIBEDIT_CFLAGS) \
305316
$(LIBREADLINE_CFLAGS) $(LIBCRYPTO_CFLAGS) \
317+
$(LIBLOWDOWN_CFLAGS) $(LIBLOWDOWN_CPPFLAGS) \
306318
-c -o $@ $<
307319

308320
.c.pgen.o:
@@ -319,19 +331,29 @@ clean-auto:
319331
$(TEST_PROGRAMS) \
320332
$(MANPAGES)
321333

334+
###### TEST SUITE #####################################
322335
TEST_PROGRAMS = \
323336
tests/json-escape \
324337
tests/github-parse \
325338
tests/gitlab-parse \
326339
tests/gitea-parse \
327340
tests/bugzilla-parse \
328341
tests/url-encode \
329-
tests/pretty-print \
330342
tests/jsongen \
331343
tests/base64 \
332344
tests/difftests
333345

334-
$(TEST_PROGRAMS): libgcli.a $(TEST_PROGRAMS:=.tests.o)
346+
tests/json-escape: tests/json-escape.tests.o
347+
tests/github-parse: tests/github-parse.tests.o
348+
tests/gitlab-parse: tests/gitlab-parse.tests.o
349+
tests/gitea-parse: tests/gitea-parse.tests.o
350+
tests/bugzilla-parse: tests/bugzilla-parse.tests.o
351+
tests/url-encode: tests/url-encode.tests.o
352+
tests/jsongen: tests/jsongen.tests.o
353+
tests/base64: tests/base64.tests.o
354+
tests/difftests: tests/difftests.tests.o
355+
356+
$(TEST_PROGRAMS): libgcli.a
335357
$(CCACHE) $(CC) $(CFLAGS) $(CCDEPFLAGS) $(CPPFLAGS) \
336358
$(LIBATFC_CFLAGS) $(LIBCURL_CFLAGS) $(LIBCRYPTO_CFLAGS) \
337359
$(LDFLAGS) -o $@ $(@:=.tests.o) libgcli.a \
@@ -396,5 +418,19 @@ install-auto: manpages gcli
396418
$(INSTALL) -d $(BINDIR)
397419
$(INSTALL) -m 0755 gcli $(BINDIR)
398420
$(INSTALL) -d $(MANDIR)
421+
$(INSTALL) -d $(MANDIR)/man5
422+
$(INSTALL) -d $(MANDIR)/man1
399423
# TODO: compress manual pages
400-
$(INSTALL) -m 644 $(MANPAGES) $(MANDIR)
424+
for PAGE in $(MANPAGES); do \
425+
case $$PAGE in \
426+
*.1) \
427+
$(INSTALL) -m 644 $$PAGE $(MANDIR)/man1 \
428+
;; \
429+
*.5) \
430+
$(INSTALL) -m 644 $$PAGE $(MANDIR)/man5 \
431+
;; \
432+
*) \
433+
echo error installing man page $$PAGE >&2 \
434+
;; \
435+
esac \
436+
done

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Required dependencies:
4545
- libcurl
4646
- yacc (System V yacc, Berkeley Yacc or Bison should suffice)
4747
- lex (flex is preferred)
48-
- C99 Compiler and linker
48+
- C11 Compiler and linker
4949
- make
5050
- pkg-config
5151

0 commit comments

Comments
 (0)