commit - bdf7ef6f884f541cbc9915752a2667570b3572c5
commit + c29409f9fb2acedc978ae8232c2ba5f958c83445
blob - 7fae44225c920ee600411e33b08a85e7f1f7d186
blob + 7cbf807ff0f1d429e06cb60068afd9f1e044f05d
--- 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";