Simple branch staleness implementation
parent: tbd commit: efc3f02
1 | use Display; |
2 | |
3 | use ; |
4 | |
5 | use crate::; |
6 | |
7 | use ; |
8 | |
9 | // pub struct RepositorySetting<V: GiteratedObjectValue>(pub V); |
10 | |
11 | // impl<O: GiteratedObject, V: GiteratedObjectValue<Object = O> + Send> GiteratedOperation<O> |
12 | // for RepositorySetting<V> |
13 | // { |
14 | // fn operation_name(&self) -> &'static str { |
15 | // "setting_get" |
16 | // } |
17 | // type Success = V; |
18 | // type Failure = GetValueError; |
19 | // } |
20 | |
21 | |
22 | ; |
23 | |
24 | |
25 | |
26 | f.write_str |
27 | |
28 | |
29 | |
30 | |
31 | type Object = Repository; |
32 | |
33 | |
34 | "description" |
35 | |
36 | |
37 | |
38 | |
39 | |
40 | "description" |
41 | |
42 | |
43 | |
44 | |
45 | |
46 | |
47 | ; |
48 | |
49 | |
50 | type Object = Repository; |
51 | |
52 | |
53 | "visibility" |
54 | |
55 | |
56 | |
57 | |
58 | |
59 | "visibility" |
60 | |
61 | |
62 | |
63 | |
64 | |
65 | |
66 | ; |
67 | |
68 | |
69 | |
70 | f.write_str |
71 | |
72 | |
73 | |
74 | |
75 | type Object = Repository; |
76 | |
77 | |
78 | "default_branch" |
79 | |
80 | |
81 | |
82 | |
83 | ; |
84 | |
85 | |
86 | type Object = Repository; |
87 | |
88 | |
89 | "latest_commit" |
90 | |
91 | |
92 | |
93 | |
94 | type Object = Repository; |
95 | |
96 | |
97 | "commit_body_type" |
98 | |
99 | |
100 | |
101 | /// This value determines after how long of a period of inactivity a branch is marked stale in seconds. |
102 | /// The default (as we have not implemented it via config) is about 3 months. |
103 | |
104 | ; |
105 | |
106 | |
107 | |
108 | // TODO: Make default configurable using config |
109 | // This is about 3 months in seconds |
110 | Self |
111 | |
112 | |
113 | |
114 | |
115 | type Object = Repository; |
116 | |
117 | |
118 | "branch_stale_after" |
119 | |
120 | |
121 | |
122 | |
123 | |
124 | "branch_stale_after" |
125 | |
126 | |
127 |