// GAOS's task-tracker contract, v1 (D-118). Any task tracker that implements this service can be // bound to a GAOS product. GAOS publishes it; the tutorial is guide/connect-a-task-tracker.html. // // Rules (integrations/task-tracker.html): gRPC over HTTP/2 with TLS 1.3 to a certificate GAOS pins; // HTTP Basic on every call; a task outside the credential's products answers NOT_FOUND exactly as // a missing one; UNAUTHENTICATED or PERMISSION_DENIED refuse the credential, except on RecordMerge, // where PERMISSION_DENIED or UNIMPLEMENTED means the method (or, with mark_dev_done, that half of it) // is not granted; RESOURCE_EXHAUSTED means stop calling; one uncompressed answer of at most 1 MiB. // v1 may gain new fields, methods and enum types; a published enum never gains a value. syntax = "proto3"; package gaos.tasktracker.v1; // TaskTracker is what GAOS calls on a task tracker. Unary calls only. service TaskTracker { // ListPeople returns ACTIVE people only, in a stable order (by id), one page at a time. rpc ListPeople(ListPeopleRequest) returns (ListPeopleResponse); // GetTask answers NOT_FOUND for a missing or out-of-scope task; never OK without a task. rpc GetTask(GetTaskRequest) returns (GetTaskResponse); rpc AddComment(AddCommentRequest) returns (AddCommentResponse); // RecordMerge: the pull request(s) naming the task merged. Idempotent; never moves the release // status past merged. Rules: integrations/task-tracker.html#record-merge. rpc RecordMerge(RecordMergeRequest) returns (RecordMergeResponse); } message ListPeopleRequest { int32 page = 1; // from 1 int32 page_size = 2; // GAOS sends 100; a tracker honours any value up to 100 } message Person { string id = 1; // the tracker's stable id string username = 2; string display_name = 3; string role = 4; // free text, shown to GAOS admins only string github_login = 5; bool github_verified = 6; // the tracker checked that the login belongs to the person string whatsapp = 7; // international digits, no "+"; "" when none bool whatsapp_active = 8; // the person agreed to receive messages reserved 9 to 19; // for logins on other forges (docs/designs/gitlab-forge.md) } message ListPeopleResponse { repeated Person people = 1; int32 total = 2; // how many active people the pages hold in all } message GetTaskRequest { string task_code = 1; // exactly as written in the pull request; case-sensitive } enum TaskState { TASK_STATE_UNSPECIFIED = 0; TASK_STATE_ACTIVE = 1; // open, in progress or finished: anything not archived or deleted TASK_STATE_ARCHIVED = 2; TASK_STATE_DELETED = 3; } message Task { string code = 1; string product_code = 2; // the tracker's product; compared exactly, case-sensitive TaskState state = 3; string qa_person_id = 4; // a Person.id, "" when none string url = 5; // the task's page for a person; "" when none string title = 6; // one line; "" when none repeated string assignee_ids = 7; // Person.id of every assignee; empty when the tracker does not say } message GetTaskResponse { Task task = 1; } message AddCommentRequest { string task_code = 1; string text = 2; // at most 1500 characters (Unicode code points) } message AddCommentResponse {} message RecordMergeRequest { string task_code = 1; string product_code = 2; // the binding's tracker product; a task of another product is NOT_FOUND string pr_url = 3; // https://github.com///pull/, for the tracker's history string person_id = 4; // the Person.id of the pull request's author; required bool mark_dev_done = 5; // only with confirm_nonce string confirm_nonce = 6; // with mark_dev_done: redeem it; without: void it (a Reject) } enum MergeOutcome { MERGE_OUTCOME_UNSPECIFIED = 0; MERGE_OUTCOME_RECORDED = 1; // the task is now at merged (and development-done, if asked) MERGE_OUTCOME_ALREADY = 2; // it was at merged or later; nothing written MERGE_OUTCOME_NEEDS_DEV_DONE = 3; // it is in development; nothing written; confirm_nonce issued MERGE_OUTCOME_REFUSED = 4; // nothing written; reason says why } message RecordMergeResponse { MergeOutcome outcome = 1; Task task = 2; // the task as it now stands string reason = 3; // one line for a person; "" unless REFUSED string release_label = 4; // the release status now, as the tracker names it; for ALREADY string confirm_nonce = 5; // for NEEDS_DEV_DONE: one use, 24 hours, bound to task and person }