Skip to content

Commit 3889e6f

Browse files
committed
Add support for CoMaintainers field in info responses
1 parent c694607 commit 3889e6f

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

man/auracle.1.pod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,9 @@ day in dotted form.
205205

206206
String array fields: B<{depends}>, B<{makedepends}>, B<{checkdepends}>,
207207
B<{optdepends}>, B<{conflicts}>, B<{provides}>, B<{replaces}>, B<{groups}>,
208-
B<{keywords}>, B<{licenses}>. These fields default to using a delimiter of two
209-
whitespace, but can be customized, e.g. B<{depends:,}> to comma delimit the
210-
values of the depends field.
208+
B<{keywords}>, B<{licenses}>, B<{comaintainers}>. These fields default to using
209+
a delimiter of two whitespace, but can be customized, e.g. B<{depends:,}> to
210+
comma delimit the values of the depends field.
211211

212212
Example: recreating auracle's search output:
213213

src/aur/package.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ void from_json(const nlohmann::json& j, Package& p) {
4949
// clang-format off
5050
static const auto& callbacks = *new CallbackMap<Package>{
5151
{ "CheckDepends", MakeValueCallback(&Package::checkdepends) },
52+
{ "CoMaintainers", MakeValueCallback(&Package::comaintainers) },
5253
{ "Conflicts", MakeValueCallback(&Package::conflicts) },
5354
{ "Depends", MakeValueCallback(&Package::depends) },
5455
{ "Description", MakeValueCallback(&Package::description) },

src/aur/package.hh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ struct Package {
5252
std::vector<std::string> optdepends;
5353
std::vector<std::string> provides;
5454
std::vector<std::string> replaces;
55+
std::vector<std::string> comaintainers;
5556

5657
std::vector<Dependency> depends;
5758
std::vector<Dependency> makedepends;

src/auracle/format.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ void Long(const aur::Package& package,
188188
fmt::print("{}", Field("Popularity", p.popularity));
189189
fmt::print("{}", Field("Maintainer",
190190
p.maintainer.empty() ? "(orphan)" : p.maintainer));
191+
fmt::print("{}", Field("Co-maintainers", p.comaintainers));
191192
fmt::print("{}", Field("Submitted", p.submitted));
192193
fmt::print("{}", Field("Last Modified", p.modified));
193194
if (p.out_of_date > absl::UnixEpoch()) {
@@ -214,6 +215,7 @@ void FormatCustomTo(std::string& out, std::string_view format,
214215
fmt::arg("name", package.name),
215216
fmt::arg("description", package.description),
216217
fmt::arg("maintainer", package.maintainer),
218+
fmt::arg("comaintainers", package.comaintainers),
217219
fmt::arg("version", package.version),
218220
fmt::arg("pkgbase", package.pkgbase),
219221
fmt::arg("url", package.upstream_url),

0 commit comments

Comments
 (0)