| 1160 | } |
| 1161 | |
| 1162 | func renderPullRequestPlain(w io.Writer, params map[string]any, state *shared.IssueMetadataState) error { |
| 1163 | fmt.Fprint(w, "Would have created a Pull Request with:\n") |
| 1164 | fmt.Fprintf(w, "title:\t%s\n", params["title"]) |
| 1165 | fmt.Fprintf(w, "draft:\t%t\n", params["draft"]) |
| 1166 | fmt.Fprintf(w, "base:\t%s\n", params["baseRefName"]) |
| 1167 | fmt.Fprintf(w, "head:\t%s\n", params["headRefName"]) |
| 1168 | if len(state.Labels) != 0 { |
| 1169 | fmt.Fprintf(w, "labels:\t%v\n", strings.Join(state.Labels, ", ")) |
| 1170 | } |
| 1171 | if len(state.Reviewers) != 0 { |
| 1172 | fmt.Fprintf(w, "reviewers:\t%v\n", strings.Join(state.Reviewers, ", ")) |
| 1173 | } |
| 1174 | if len(state.Assignees) != 0 { |
| 1175 | fmt.Fprintf(w, "assignees:\t%v\n", strings.Join(state.Assignees, ", ")) |
| 1176 | } |
| 1177 | if len(state.Milestones) != 0 { |
| 1178 | fmt.Fprintf(w, "milestones:\t%v\n", strings.Join(state.Milestones, ", ")) |
| 1179 | } |
| 1180 | if len(state.ProjectTitles) != 0 { |
| 1181 | fmt.Fprintf(w, "projects:\t%v\n", strings.Join(state.ProjectTitles, ", ")) |
| 1182 | } |
| 1183 | fmt.Fprintf(w, "maintainerCanModify:\t%t\n", params["maintainerCanModify"]) |
| 1184 | fmt.Fprint(w, "body:\n") |
| 1185 | if len(params["body"].(string)) != 0 { |
| 1186 | fmt.Fprintln(w, params["body"]) |
| 1187 | } |
| 1188 | return nil |
| 1189 | } |
| 1190 | |
| 1191 | func renderPullRequestTTY(io *iostreams.IOStreams, params map[string]any, state *shared.IssueMetadataState) error { |
| 1192 | cs := io.ColorScheme() |