1#![allow(clippy::needless_update)]
2
3use std::collections::HashMap;
4
5use derive_setters::Setters;
6use merge::Merge;
7use serde::{Deserialize, Serialize};
8
9use crate::is_default;
10
11#[derive(Default, Debug, Clone, Deserialize, Serialize, Merge, Setters, PartialEq, Eq)]
14#[setters(strip_option, into)]
15pub struct Event {
16 #[serde(skip_serializing_if = "Option::is_none")]
17 pub branch_protection_rule: Option<BranchProtectionRule>,
18 #[serde(skip_serializing_if = "Option::is_none")]
19 pub check_run: Option<CheckRun>,
20 #[serde(skip_serializing_if = "Option::is_none")]
21 pub check_suite: Option<CheckSuite>,
22 #[serde(skip_serializing_if = "Option::is_none")]
23 pub create: Option<Create>,
24 #[serde(skip_serializing_if = "Option::is_none")]
25 pub delete: Option<Delete>,
26 #[serde(skip_serializing_if = "Option::is_none")]
27 pub deployment: Option<Deployment>,
28 #[serde(skip_serializing_if = "Option::is_none")]
29 pub deployment_status: Option<DeploymentStatus>,
30 #[serde(skip_serializing_if = "Option::is_none")]
31 pub discussion: Option<Discussion>,
32 #[serde(skip_serializing_if = "Option::is_none")]
33 pub discussion_comment: Option<DiscussionComment>,
34 #[serde(skip_serializing_if = "Option::is_none")]
35 pub fork: Option<bool>,
36 #[serde(skip_serializing_if = "Option::is_none")]
37 pub gollum: Option<bool>,
38 #[serde(skip_serializing_if = "Option::is_none")]
39 pub issue_comment: Option<IssueComment>,
40 #[serde(skip_serializing_if = "Option::is_none")]
41 pub issues: Option<Issues>,
42 #[serde(skip_serializing_if = "Option::is_none")]
43 pub label: Option<Label>,
44 #[serde(skip_serializing_if = "Option::is_none")]
45 pub merge_group: Option<MergeGroup>,
46 #[serde(skip_serializing_if = "Option::is_none")]
47 pub milestone: Option<Milestone>,
48 #[serde(skip_serializing_if = "Option::is_none")]
49 pub page_build: Option<bool>,
50 #[serde(skip_serializing_if = "Option::is_none")]
51 pub public: Option<bool>,
52 #[serde(skip_serializing_if = "Option::is_none")]
53 pub pull_request: Option<PullRequest>,
54 #[serde(skip_serializing_if = "Option::is_none")]
55 pub pull_request_review: Option<PullRequestReview>,
56 #[serde(skip_serializing_if = "Option::is_none")]
57 pub pull_request_review_comment: Option<PullRequestReviewComment>,
58 #[serde(skip_serializing_if = "Option::is_none")]
59 pub pull_request_target: Option<PullRequestTarget>,
60 #[serde(skip_serializing_if = "Option::is_none")]
61 pub push: Option<Push>,
62 #[serde(skip_serializing_if = "Option::is_none")]
63 pub registry_package: Option<RegistryPackage>,
64 #[serde(skip_serializing_if = "Option::is_none")]
65 pub release: Option<Release>,
66 #[serde(skip_serializing_if = "Option::is_none")]
67 pub repository_dispatch: Option<RepositoryDispatch>,
68 #[serde(skip_serializing_if = "Option::is_none")]
69 pub schedule: Option<Schedule>,
70 #[serde(skip_serializing_if = "Option::is_none")]
71 pub status: Option<bool>,
72 #[serde(skip_serializing_if = "Option::is_none")]
73 pub watch: Option<Watch>,
74 #[serde(skip_serializing_if = "Option::is_none")]
75 pub workflow_call: Option<WorkflowCall>,
76 #[serde(skip_serializing_if = "Option::is_none")]
77 pub workflow_dispatch: Option<WorkflowDispatch>,
78 #[serde(skip_serializing_if = "Option::is_none")]
79 pub workflow_run: Option<WorkflowRun>,
80}
81
82#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
85#[serde(rename_all = "snake_case")]
86pub enum BranchProtectionRuleType {
87 Created,
89 Edited,
91 Deleted,
93}
94
95#[derive(Debug, Clone, Default, Deserialize, Serialize, Setters, PartialEq, Eq)]
97#[setters(strip_option, into)]
98pub struct BranchProtectionRule {
99 #[serde(default, skip_serializing_if = "Vec::is_empty")]
100 pub types: Vec<BranchProtectionRuleType>,
101}
102
103impl BranchProtectionRule {
104 pub fn add_type(mut self, type_: BranchProtectionRuleType) -> Self {
106 self.types.push(type_);
107 self
108 }
109}
110
111#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
114#[serde(rename_all = "snake_case")]
115pub enum CheckRunType {
116 Created,
118 Rerequested,
120 Completed,
122 RequestedAction,
124}
125
126#[derive(Debug, Clone, Default, Deserialize, Serialize, Setters, PartialEq, Eq)]
127#[setters(strip_option, into)]
128pub struct CheckRun {
129 #[serde(default, skip_serializing_if = "Vec::is_empty")]
130 pub types: Vec<CheckRunType>,
131}
132
133impl CheckRun {
134 pub fn add_type(mut self, type_: CheckRunType) -> Self {
136 self.types.push(type_);
137 self
138 }
139}
140
141#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
144#[serde(rename_all = "snake_case")]
145pub enum CheckSuiteType {
146 Completed,
148}
149
150#[derive(Debug, Clone, Default, Deserialize, Serialize, Setters, PartialEq, Eq)]
153#[setters(strip_option, into)]
154pub struct CheckSuite {
155 #[serde(default, skip_serializing_if = "Vec::is_empty")]
156 pub types: Vec<CheckSuiteType>,
157}
158
159impl CheckSuite {
160 pub fn add_type(mut self, type_: CheckSuiteType) -> Self {
162 self.types.push(type_);
163 self
164 }
165}
166
167#[derive(Debug, Clone, Default, Deserialize, Serialize, Setters, PartialEq, Eq)]
170#[setters(strip_option, into)]
171pub struct Create {
172 #[serde(default, skip_serializing_if = "Vec::is_empty")]
174 pub branches: Vec<String>,
175 #[serde(default, skip_serializing_if = "Vec::is_empty")]
177 pub tags: Vec<String>,
178}
179
180impl Create {
181 pub fn add_branch<S: Into<String>>(mut self, branch: S) -> Self {
183 self.branches.push(branch.into());
184 self
185 }
186
187 pub fn add_tag<S: Into<String>>(mut self, tag: S) -> Self {
189 self.tags.push(tag.into());
190 self
191 }
192}
193
194#[derive(Debug, Clone, Default, Deserialize, Serialize, Setters, PartialEq, Eq)]
197#[setters(strip_option, into)]
198pub struct Delete {
199 #[serde(default, skip_serializing_if = "Vec::is_empty")]
201 pub branches: Vec<String>,
202 #[serde(default, skip_serializing_if = "Vec::is_empty")]
204 pub tags: Vec<String>,
205}
206
207impl Delete {
208 pub fn add_branch<S: Into<String>>(mut self, branch: S) -> Self {
210 self.branches.push(branch.into());
211 self
212 }
213
214 pub fn add_tag<S: Into<String>>(mut self, tag: S) -> Self {
216 self.tags.push(tag.into());
217 self
218 }
219}
220
221#[derive(Debug, Clone, Default, Deserialize, Serialize, Setters, PartialEq, Eq)]
225#[setters(strip_option, into)]
226pub struct Deployment {
227 #[serde(default, skip_serializing_if = "Vec::is_empty")]
229 pub branches: Vec<String>,
230}
231
232impl Deployment {
233 pub fn add_branch<S: Into<String>>(mut self, branch: S) -> Self {
235 self.branches.push(branch.into());
236 self
237 }
238}
239
240#[derive(Debug, Clone, Default, Deserialize, Serialize, Setters, PartialEq, Eq)]
244#[setters(strip_option, into)]
245pub struct DeploymentStatus {
246 #[serde(default, skip_serializing_if = "Vec::is_empty")]
248 pub states: Vec<String>,
249}
250
251impl DeploymentStatus {
252 pub fn add_state<S: Into<String>>(mut self, state: S) -> Self {
254 self.states.push(state.into());
255 self
256 }
257}
258
259#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
262#[serde(rename_all = "snake_case")]
263pub enum DiscussionType {
264 Created,
266 Edited,
268 Deleted,
270 Transferred,
272 Pinned,
274 Unpinned,
276 Labeled,
278 Unlabeled,
280 Locked,
282 Unlocked,
284 CategoryChanged,
286 Answered,
288 Unanswered,
290}
291
292#[derive(Debug, Clone, Default, Deserialize, Serialize, Setters, PartialEq, Eq)]
295pub struct Discussion {
296 #[serde(default, skip_serializing_if = "Vec::is_empty")]
298 pub types: Vec<DiscussionType>,
299}
300
301impl Discussion {
302 pub fn add_type(mut self, type_: DiscussionType) -> Self {
304 self.types.push(type_);
305 self
306 }
307}
308
309#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
312#[serde(rename_all = "snake_case")]
313pub enum DiscussionCommentType {
314 Created,
316 Edited,
318 Deleted,
320}
321
322#[derive(Debug, Clone, Default, Deserialize, Serialize, Setters, PartialEq, Eq)]
325pub struct DiscussionComment {
326 #[serde(default, skip_serializing_if = "Vec::is_empty")]
328 pub types: Vec<DiscussionCommentType>,
329}
330
331impl DiscussionComment {
332 pub fn add_type(mut self, type_: DiscussionCommentType) -> Self {
334 self.types.push(type_);
335 self
336 }
337}
338
339#[derive(Debug, Clone, Default, Deserialize, Serialize, Setters, PartialEq, Eq)]
342pub struct IssueComment {
343 #[serde(default, skip_serializing_if = "Vec::is_empty")]
345 pub types: Vec<IssueCommentType>,
346}
347
348#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
350#[serde(rename_all = "snake_case")]
351pub enum IssueCommentType {
352 Created,
354 Edited,
356 Deleted,
358}
359
360impl IssueComment {
361 pub fn add_type(mut self, type_: IssueCommentType) -> Self {
363 self.types.push(type_);
364 self
365 }
366}
367
368#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
371#[serde(rename_all = "snake_case")]
372pub enum IssuesType {
373 Opened,
375 Edited,
377 Deleted,
379 Transferred,
381 Pinned,
383 Unpinned,
385 Closed,
387 Reopened,
389 Assigned,
391 Unassigned,
393 Labeled,
395 Unlabeled,
397 Locked,
399 Unlocked,
401 Milestoned,
403 Demilestoned,
405}
406
407#[derive(Debug, Clone, Default, Deserialize, Serialize, Setters, PartialEq, Eq)]
410#[setters(strip_option, into)]
411pub struct Issues {
412 #[serde(default, skip_serializing_if = "Vec::is_empty")]
414 pub types: Vec<IssuesType>,
415}
416
417impl Issues {
418 pub fn add_type(mut self, type_: IssuesType) -> Self {
420 self.types.push(type_);
421 self
422 }
423}
424
425#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
428#[serde(rename_all = "snake_case")]
429pub enum LabelType {
430 Created,
432 Edited,
434 Deleted,
436}
437
438#[derive(Debug, Clone, Default, Deserialize, Serialize, Setters, PartialEq, Eq)]
441#[setters(strip_option, into)]
442pub struct Label {
443 #[serde(default, skip_serializing_if = "Vec::is_empty")]
445 pub types: Vec<LabelType>,
446}
447
448impl Label {
449 pub fn add_type(mut self, type_: LabelType) -> Self {
451 self.types.push(type_);
452 self
453 }
454}
455
456#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
457#[serde(rename_all = "snake_case")]
458pub enum MergeGroupType {
459 ChecksRequested,
460}
461
462#[derive(Debug, Clone, Default, Deserialize, Serialize, Setters, PartialEq, Eq)]
463#[setters(strip_option, into)]
464pub struct MergeGroup {
465 #[serde(default, skip_serializing_if = "Vec::is_empty")]
466 pub types: Vec<MergeGroupType>,
467}
468
469impl MergeGroup {
470 pub fn add_type(mut self, type_: MergeGroupType) -> Self {
471 self.types.push(type_);
472 self
473 }
474}
475
476#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
477#[serde(rename_all = "snake_case")]
478pub enum MilestoneType {
479 Created,
480 Closed,
481 Opened,
482 Edited,
483 Deleted,
484}
485
486#[derive(Debug, Clone, Default, Deserialize, Serialize, Setters, PartialEq, Eq)]
487#[setters(strip_option, into)]
488pub struct Milestone {
489 #[serde(default, skip_serializing_if = "Vec::is_empty")]
490 pub types: Vec<MilestoneType>,
491}
492
493impl Milestone {
494 pub fn add_type(mut self, type_: MilestoneType) -> Self {
495 self.types.push(type_);
496 self
497 }
498}
499
500#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
501#[serde(rename_all = "snake_case")]
502pub enum PullRequestType {
503 Assigned,
504 Unassigned,
505 Labeled,
506 Unlabeled,
507 Opened,
508 Edited,
509 Closed,
510 Reopened,
511 Synchronize,
512 ReadyForReview,
513 Locked,
514 Unlocked,
515 ReviewRequested,
516 ReviewRequestRemoved,
517}
518
519#[derive(Debug, Clone, Default, Deserialize, Serialize, Setters, PartialEq, Eq)]
520#[setters(strip_option, into)]
521pub struct PullRequest {
522 #[serde(default, skip_serializing_if = "Vec::is_empty")]
523 pub types: Vec<PullRequestType>,
524 #[serde(default, skip_serializing_if = "Vec::is_empty")]
525 pub branches: Vec<String>,
526 #[serde(default, skip_serializing_if = "Vec::is_empty")]
527 pub paths: Vec<String>,
528}
529
530impl PullRequest {
531 pub fn add_type(mut self, type_: PullRequestType) -> Self {
532 self.types.push(type_);
533 self
534 }
535
536 pub fn add_branch<S: Into<String>>(mut self, branch: S) -> Self {
537 self.branches.push(branch.into());
538 self
539 }
540
541 pub fn add_path<S: Into<String>>(mut self, path: S) -> Self {
542 self.paths.push(path.into());
543 self
544 }
545}
546
547#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
550#[serde(rename_all = "snake_case")]
551pub enum PullRequestReviewType {
552 Submitted,
554 Edited,
556 Dismissed,
558}
559
560#[derive(Debug, Clone, Default, Deserialize, Serialize, Setters, PartialEq, Eq)]
563#[setters(strip_option, into)]
564pub struct PullRequestReview {
565 #[serde(default, skip_serializing_if = "Vec::is_empty")]
567 pub types: Vec<PullRequestReviewType>,
568}
569
570impl PullRequestReview {
571 pub fn add_type(mut self, type_: PullRequestReviewType) -> Self {
573 self.types.push(type_);
574 self
575 }
576}
577
578#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
581#[serde(rename_all = "snake_case")]
582pub enum PullRequestReviewCommentType {
583 Created,
585 Edited,
587 Deleted,
589}
590
591#[derive(Debug, Clone, Default, Deserialize, Serialize, Setters, PartialEq, Eq)]
593#[setters(strip_option, into)]
594pub struct PullRequestReviewComment {
595 #[serde(default, skip_serializing_if = "Vec::is_empty")]
597 pub types: Vec<PullRequestReviewCommentType>,
598}
599
600impl PullRequestReviewComment {
601 pub fn add_type(mut self, type_: PullRequestReviewCommentType) -> Self {
603 self.types.push(type_);
604 self
605 }
606}
607
608#[derive(Debug, Clone, Default, Deserialize, Serialize, Setters, PartialEq, Eq)]
611#[setters(strip_option, into)]
612pub struct PullRequestTarget {
613 #[serde(default, skip_serializing_if = "Vec::is_empty")]
615 pub types: Vec<PullRequestType>,
616 #[serde(default, skip_serializing_if = "Vec::is_empty")]
618 pub branches: Vec<String>,
619}
620
621impl PullRequestTarget {
622 pub fn add_type(mut self, type_: PullRequestType) -> Self {
624 self.types.push(type_);
625 self
626 }
627
628 pub fn add_branch<S: Into<String>>(mut self, branch: S) -> Self {
630 self.branches.push(branch.into());
631 self
632 }
633}
634
635#[derive(Debug, Clone, Default, Deserialize, Serialize, Setters, PartialEq, Eq)]
638#[setters(strip_option, into)]
639pub struct Push {
640 #[serde(default, skip_serializing_if = "Vec::is_empty")]
642 pub branches: Vec<String>,
643 #[serde(default, skip_serializing_if = "Vec::is_empty")]
645 pub paths: Vec<String>,
646 #[serde(default, skip_serializing_if = "Vec::is_empty")]
648 pub tags: Vec<String>,
649}
650
651impl Push {
652 pub fn add_branch<S: Into<String>>(mut self, branch: S) -> Self {
654 self.branches.push(branch.into());
655 self
656 }
657
658 pub fn add_path<S: Into<String>>(mut self, path: S) -> Self {
660 self.paths.push(path.into());
661 self
662 }
663
664 pub fn add_tag<S: Into<String>>(mut self, tag: S) -> Self {
666 self.tags.push(tag.into());
667 self
668 }
669}
670
671#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
674#[serde(rename_all = "snake_case")]
675pub enum RegistryPackageType {
676 Published,
678 Updated,
680}
681
682#[derive(Debug, Clone, Default, Deserialize, Serialize, Setters, PartialEq, Eq)]
685#[setters(strip_option, into)]
686pub struct RegistryPackage {
687 #[serde(default, skip_serializing_if = "Vec::is_empty")]
689 pub types: Vec<RegistryPackageType>,
690}
691
692impl RegistryPackage {
693 pub fn add_type(mut self, type_: RegistryPackageType) -> Self {
695 self.types.push(type_);
696 self
697 }
698}
699
700#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
703#[serde(rename_all = "snake_case")]
704pub enum ReleaseType {
705 Published,
707 Unpublished,
709 Created,
711 Edited,
713 Deleted,
715 Prereleased,
717 Released,
719}
720
721#[derive(Debug, Clone, Default, Deserialize, Serialize, Setters, PartialEq, Eq)]
724#[setters(strip_option, into)]
725pub struct Release {
726 #[serde(default, skip_serializing_if = "Vec::is_empty")]
728 pub types: Vec<ReleaseType>,
729}
730
731impl Release {
732 pub fn add_type(mut self, type_: ReleaseType) -> Self {
734 self.types.push(type_);
735 self
736 }
737}
738
739#[derive(Debug, Clone, Default, Deserialize, Serialize, Setters, PartialEq, Eq)]
740#[setters(strip_option, into)]
741pub struct RepositoryDispatch {
742 #[serde(default, skip_serializing_if = "Vec::is_empty")]
743 pub types: Vec<String>,
744}
745
746impl RepositoryDispatch {
747 pub fn add_type<S: Into<String>>(mut self, type_: S) -> Self {
748 self.types.push(type_.into());
749 self
750 }
751}
752
753#[derive(Debug, Clone, Default, Deserialize, Serialize, Setters, PartialEq, Eq)]
754#[setters(strip_option, into)]
755pub struct Schedule {
756 #[serde(default, skip_serializing_if = "Vec::is_empty")]
757 pub cron: Vec<String>,
758}
759
760impl Schedule {
761 pub fn add_cron<S: Into<String>>(mut self, cron: S) -> Self {
762 self.cron.push(cron.into());
763 self
764 }
765}
766
767#[derive(Debug, Clone, Default, Deserialize, Serialize, Setters, PartialEq, Eq)]
768#[setters(strip_option, into)]
769pub struct Watch {
770 #[serde(default, skip_serializing_if = "Vec::is_empty")]
771 pub types: Vec<String>,
772}
773
774impl Watch {
775 pub fn add_type<S: Into<String>>(mut self, type_: S) -> Self {
776 self.types.push(type_.into());
777 self
778 }
779}
780
781#[derive(Debug, Clone, Default, Deserialize, Serialize, Setters, PartialEq, Eq)]
784#[setters(strip_option, into)]
785pub struct WorkflowCall {
786 #[serde(skip_serializing_if = "HashMap::is_empty")]
788 pub inputs: HashMap<String, WorkflowCallInput>,
789 #[serde(skip_serializing_if = "HashMap::is_empty")]
791 pub outputs: HashMap<String, WorkflowCallOutput>,
792 #[serde(skip_serializing_if = "HashMap::is_empty")]
794 pub secrets: HashMap<String, WorkflowCallSecret>,
795}
796
797#[derive(Debug, Clone, Default, Deserialize, Serialize, PartialEq, Setters, Eq)]
799#[setters(strip_option, into)]
800pub struct WorkflowCallInput {
801 #[serde(skip_serializing_if = "String::is_empty")]
803 pub description: String,
804 #[serde(skip_serializing_if = "is_default")]
806 pub required: bool,
807 #[serde(rename = "type")]
809 pub input_type: String,
810 #[serde(skip_serializing_if = "Option::is_none")]
812 pub default: Option<String>,
813}
814
815#[derive(Debug, Clone, Default, Deserialize, Serialize, PartialEq, Setters, Eq)]
817#[setters(strip_option, into)]
818pub struct WorkflowCallOutput {
819 #[serde(skip_serializing_if = "String::is_empty")]
821 pub description: String,
822 #[serde(skip_serializing_if = "String::is_empty")]
824 pub value: String,
825}
826
827#[derive(Debug, Clone, Default, Deserialize, Serialize, PartialEq, Setters, Eq)]
829#[setters(strip_option, into)]
830pub struct WorkflowCallSecret {
831 #[serde(skip_serializing_if = "String::is_empty")]
833 pub description: String,
834 #[serde(skip_serializing_if = "is_default")]
836 pub required: bool,
837}
838
839#[derive(Debug, Clone, Default, Deserialize, Serialize, Setters, PartialEq, Eq)]
843#[setters(strip_option, into)]
844pub struct WorkflowDispatch {
845 #[serde(skip_serializing_if = "HashMap::is_empty")]
847 pub inputs: HashMap<String, WorkflowDispatchInput>,
848}
849
850#[derive(Debug, Clone, Default, Deserialize, Serialize, Setters, PartialEq, Eq)]
852#[setters(strip_option, into)]
853pub struct WorkflowDispatchInput {
854 #[serde(skip_serializing_if = "String::is_empty")]
856 pub description: String,
857 #[serde(skip_serializing_if = "is_default")]
859 pub required: bool,
860 #[serde(rename = "type")]
862 pub input_type: String,
863 #[serde(skip_serializing_if = "Option::is_none")]
865 pub default: Option<String>,
866}
867
868#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
871#[serde(rename_all = "snake_case")]
872pub enum WorkflowRunType {
873 Completed,
875 Requested,
877 InProgress,
879}
880
881#[derive(Debug, Clone, Default, Deserialize, Serialize, Setters, PartialEq, Eq)]
883#[setters(strip_option, into)]
884pub struct WorkflowRun {
885 #[serde(default, skip_serializing_if = "Vec::is_empty")]
887 pub types: Vec<WorkflowRunType>,
888 #[serde(default, skip_serializing_if = "Vec::is_empty")]
890 pub workflows: Vec<String>,
891 #[serde(default, skip_serializing_if = "Vec::is_empty")]
893 pub branches: Vec<String>,
894}
895
896impl WorkflowRun {
897 pub fn add_type(mut self, type_: WorkflowRunType) -> Self {
899 self.types.push(type_);
900 self
901 }
902
903 pub fn add_workflow<S: Into<String>>(mut self, workflow: S) -> Self {
905 self.workflows.push(workflow.into());
906 self
907 }
908
909 pub fn add_branch<S: Into<String>>(mut self, branch: S) -> Self {
911 self.branches.push(branch.into());
912 self
913 }
914}