syntax = "proto3";

import "ci/tasklet/common/proto/service.proto";
import "tasklet/api/tasklet.proto";
import "tasklet/services/ci/proto/ci.proto";
import "tasklet/services/yav/proto/yav.proto";

import "intranet/d/tasklets/tracker/proto/issue.proto";
import "intranet/d/tasklets/tracker/proto/tracker.proto";

package intranet.d.tasklets.tracker.issue_create;

message Config {
    string queue = 1;
    string type = 2;
    string summary = 3;
    string description = 4;
    string assignee = 5;
    repeated string followers = 6;
    repeated string components = 7;
    repeated string tags = 8;

    intranet.d.tasklets.tracker.tracker.Config tracker = 9;
}

message Input {
    ci.TaskletContext context = 1;
    Config config = 2;
}

message Output {
    intranet.d.tasklets.tracker.common.Issue issue = 1;
}

message Context {
    option (tasklet.context) = true;

    yav_service.YavService yav = 1 [(tasklet.inject) = true];
    ci.CiService ci = 2 [(tasklet.inject) = true];
}

message IssueCreate {
    option (tasklet.tasklet_interface) = true;

    Input input = 1 [(tasklet.input) = true];
    Output output = 2 [(tasklet.output) = true];

    Context ctx = 3;
}
