commit 1a0b777c8b56bb65b213704af778bf17b98cb98c from: Omar Polo via: Thomas Adam date: Sun May 05 09:50:52 2024 UTC got-notify-http: rename auth_user -> authenticated_user ok stsp@ commit - a219eefd27b5f1aafc768c7b6c75ed0e203ee5cb commit + 1a0b777c8b56bb65b213704af778bf17b98cb98c blob - 80848550d9f189c5f02f34fea14379857dbd78a1 blob + bd6a17f9a4698f159dcf27a9d7f9e2b96e89a9bd --- gotd/gotd.conf.5 +++ gotd/gotd.conf.5 @@ -365,10 +365,10 @@ The request body contains a JSON object with a .Dq notifications property containing an array of notification objects. The following notification object properties are always present: -.Bl -tag -width auth_user +.Bl -tag -width authenticated_user .It Dv repo The repository name as a string. -.It Dv auth_user +.It Dv authenticated_user The committer's user account as authenticated by .Xr gotd 8 as a string. blob - 7cbf807ff0f1d429e06cb60068afd9f1e044f05d blob + 4c4f536b692e63fe51f8a8d4755437761009301f --- gotd/libexec/got-notify-http/got-notify-http.c +++ gotd/libexec/got-notify-http/got-notify-http.c @@ -222,7 +222,7 @@ jsonify_branch_rm(FILE *fp, char *line, const char *re fputc('{', fp); json_field(fp, "type", "branch-deleted", 1); json_field(fp, "repo", repo, 1); - json_field(fp, "auth_user", user, 1); + json_field(fp, "authenticated_user", user, 1); json_field(fp, "ref", ref, 1); json_field(fp, "id", id, 0); fputc('}', fp); @@ -255,7 +255,7 @@ jsonify_commit_short(FILE *fp, char *line, const char fprintf(fp, "{\"type\":\"commit\",\"short\":true,"); json_field(fp, "repo", repo, 1); - json_field(fp, "auth_user", user, 1); + json_field(fp, "authenticated_user", user, 1); json_field(fp, "id", id, 1); json_author(fp, "committer", author, 1); json_date(fp, "date", date, 1); @@ -296,7 +296,7 @@ jsonify_commit(FILE *fp, const char *repo, const char fprintf(fp, "{\"type\":\"commit\",\"short\":false,"); json_field(fp, "repo", repo, 1); - json_field(fp, "auth_user", user, 1); + json_field(fp, "authenticated_user", user, 1); json_field(fp, "id", l, 1); while (!done) { @@ -587,7 +587,7 @@ jsonify_tag(FILE *fp, const char *repo, const char *us fputc('{', fp); json_field(fp, "type", "tag", 1); json_field(fp, "repo", repo, 1); - json_field(fp, "auth_user", user, 1); + json_field(fp, "authenticated_user", user, 1); json_field(fp, "tag", l, 1); while (!done) { blob - daa3a3c53c47d2e2f9f1506b58b3ea5def124c05 blob + 4e84724b805fce88a8e881e5700e1c71b5b4fd5b --- regress/gotd/http_notification.sh +++ regress/gotd/http_notification.sh @@ -64,7 +64,7 @@ test_file_changed() { "type":"commit", "short":false, "repo":"test-repo", - "auth_user":"${GOTD_DEVUSER}", + "authenticated_user":"${GOTD_DEVUSER}", "id":"$commit_id", "author":{ "full":"$GOT_AUTHOR", @@ -133,7 +133,7 @@ test_file_changed() { "type":"commit", "short":false, "repo":"test-repo", - "auth_user":"${GOTD_DEVUSER}", + "authenticated_user":"${GOTD_DEVUSER}", "id":"$commit_id", "author":{ "full":"$GOT_AUTHOR", @@ -222,7 +222,7 @@ test_bad_utf8() { "type":"commit", "short":false, "repo":"test-repo", - "auth_user":"${GOTD_DEVUSER}", + "authenticated_user":"${GOTD_DEVUSER}", "id":"$commit_id", "author":{ "full":"$GOT_AUTHOR", @@ -323,7 +323,7 @@ test_many_commits_not_summarized() { "type":"commit", "short":false, "repo":"test-repo", - "auth_user":"${GOTD_DEVUSER}", + "authenticated_user":"${GOTD_DEVUSER}", "id":"$commit_id", "author":{ "full":"$GOT_AUTHOR", @@ -428,7 +428,7 @@ test_many_commits_summarized() { "type":"commit", "short":true, "repo":"test-repo", - "auth_user":"${GOTD_DEVUSER}", + "authenticated_user":"${GOTD_DEVUSER}", "id":"$commit_id", "committer":{ "user":"$GOT_AUTHOR_8" @@ -509,7 +509,7 @@ test_branch_created() { "type":"commit", "short":false, "repo":"test-repo", - "auth_user":"${GOTD_DEVUSER}", + "authenticated_user":"${GOTD_DEVUSER}", "id":"$commit_id", "author":{ "full":"$GOT_AUTHOR", @@ -588,7 +588,7 @@ test_branch_removed() { {"notifications":[{ "type":"branch-deleted", "repo":"test-repo", - "auth_user":"${GOTD_DEVUSER}", + "authenticated_user":"${GOTD_DEVUSER}", "ref":"refs/heads/newbranch", "id":"$commit_id" }]} @@ -642,7 +642,7 @@ test_tag_created() { {"notifications":[{ "type":"tag", "repo":"test-repo", - "auth_user":"${GOTD_DEVUSER}", + "authenticated_user":"${GOTD_DEVUSER}", "tag":"refs/tags/1.0", "tagger":{ "full":"$GOT_AUTHOR", @@ -722,7 +722,7 @@ test_tag_changed() { {"notifications":[{ "type":"tag", "repo":"test-repo", - "auth_user":"${GOTD_DEVUSER}", + "authenticated_user":"${GOTD_DEVUSER}", "tag":"refs/tags/1.0", "tagger":{ "full":"$GOT_AUTHOR",