commit - d36998aec867c8134466eccfe048dc8671eecca5
commit + 9d42388a1a146c8563b1eae304f084a5881c09b9
blob - 110aa3179a27bd4af209fd577262ccccdd94f82b
blob + 34cebb840cd2748f8de2cf177553261cab74e768
--- gotd/libexec/got-notify-http/got-notify-http.c
+++ gotd/libexec/got-notify-http/got-notify-http.c
fputc('{', fp);
json_field(fp, "type", "branch-deleted", 1);
json_field(fp, "repo", repo, 1);
- if (user)
- json_field(fp, "auth_user", user, 1);
+ json_field(fp, "auth_user", user, 1);
json_field(fp, "ref", ref, 1);
json_field(fp, "id", id, 0);
fputc('}', fp);
fprintf(fp, "{\"type\":\"commit\",\"short\":true,");
json_field(fp, "repo", repo, 1);
- if (user)
- json_field(fp, "auth_user", user, 1);
+ json_field(fp, "auth_user", user, 1);
json_field(fp, "id", id, 1);
json_author(fp, "committer", author, 1);
json_date(fp, "date", date, 1);
fprintf(fp, "{\"type\":\"commit\",\"short\":false,");
json_field(fp, "repo", repo, 1);
- if (user)
- json_field(fp, "auth_user", user, 1);
+ json_field(fp, "auth_user", user, 1);
json_field(fp, "id", l, 1);
while (!done) {
fputc('{', fp);
json_field(fp, "type", "tag", 1);
json_field(fp, "repo", repo, 1);
- if (user)
- json_field(fp, "auth_user", user, 1);
+ json_field(fp, "auth_user", user, 1);
json_field(fp, "tag", l, 1);
while (!done) {
argc -= optind;
argv += optind;
- if (host == NULL || repo == NULL || argc != 1)
+ if (host == NULL || repo == NULL || gotd_auth_user == NULL || argc != 1)
usage();
if (tls && port == NULL)
port = "443";