config.jsonnet (9346B)
1 local lib = import './gmailctl.libsonnet'; 2 3 local toMe = { 4 or: [ 5 { to: 'vdemeest@redhat.com' }, 6 { to: 'vdemeester@redhat.com' }, 7 { to: 'vincent@sbr.pm' }, 8 ], 9 }; 10 local label_archive(filter, label) = 11 [ 12 { 13 filter: filter, 14 actions: { 15 archive: true, 16 markSpam: false, 17 labels: [ label ] 18 } 19 } 20 ] 21 ; 22 23 local rh_mailing_list(name, label = '', archive = true) = 24 local labels = 25 if label == '' then 26 [ std.join('/', std.splitLimit(name, '-', 1) ) ] 27 else 28 [ label ] 29 ; 30 31 [ 32 { 33 filter: { 34 and: [ 35 { list: name + '.redhat.com' }, 36 ], 37 }, 38 actions: { 39 archive: false, 40 markSpam: false, 41 labels: labels 42 } 43 }, 44 { 45 filter: { 46 and: [ 47 { list: name + '.redhat.com' }, 48 { to: '-me' }, 49 ], 50 }, 51 actions: { 52 archive: archive, 53 markSpam: false, 54 labels: labels 55 } 56 } 57 ] 58 ; 59 60 local google_groups(name, label = '', archive = true) = 61 local labels = 62 if label == '' then 63 [ std.join('/', std.splitLimit(name, '-', 1) ) ] 64 else 65 [ label ] 66 ; 67 68 [ 69 { 70 filter: { 71 and: [ 72 { list: name + '.googlegroups.com' }, 73 ], 74 }, 75 actions: { 76 archive: false, 77 markSpam: false, 78 labels: labels 79 } 80 }, 81 { 82 filter: { 83 and: [ 84 { list: name + '.googlegroups.com' }, 85 { to: '-me' }, 86 ], 87 }, 88 actions: { 89 archive: archive, 90 markSpam: false, 91 labels: labels 92 } 93 } 94 ] 95 ; 96 97 { 98 version: "v1alpha3", 99 author: { 100 name: "Vincent Demeester", 101 email: "vdemeest@redhat.com" 102 }, 103 // Note: labels management is optional. If you prefer to use the 104 // GMail interface to add and remove labels, you can safely remove 105 // this section of the config. 106 rules: rh_mailing_list('announce-list', 'announce') + 107 rh_mailing_list('aos-announce') + 108 rh_mailing_list('aos-devel') + 109 rh_mailing_list('aos-int-services') + 110 rh_mailing_list('aos-logging') + 111 rh_mailing_list('cloud-strategy', 'area/cloud-strategy') + 112 rh_mailing_list('france-list', 'local/france') + 113 rh_mailing_list('france-associates', 'local/france') + 114 rh_mailing_list('cdg', 'local/fance/cdg') + 115 rh_mailing_list('emea-announce', 'announce/emea') + 116 rh_mailing_list('eng-common-logging', 'aos/eng-common-logging') + 117 rh_mailing_list('insights-dev') + 118 rh_mailing_list('insights-platform') + 119 rh_mailing_list('managers-announce') + 120 rh_mailing_list('managers-list', 'managers/managers-list') + 121 rh_mailing_list('memo-list', 'memo-list') + 122 rh_mailing_list('monitoring', 'monitoring') + 123 rh_mailing_list('openshift-announce', 'aos/openshift-announce') + 124 rh_mailing_list('openshift-sme', 'aos/openshift-sme') + 125 rh_mailing_list('pnt-managers', 'managers/pnt-managers') + 126 rh_mailing_list('prod-dept', 'pnt/prod-dept') + 127 rh_mailing_list('remote-announce', 'announce/remote') + 128 rh_mailing_list('remotees-list', 'local/remotees') + 129 rh_mailing_list('rh-openstack-announce', 'pnt/rh-openstack-announce') + 130 rh_mailing_list('summitdemo2019', 'pnt/summitdemo2019') + 131 rh_mailing_list('tech-talk-announce', 'announce/tech-talk') + 132 rh_mailing_list('technical-users-list', 'technical-users') + 133 rh_mailing_list('upshift', 'psi') + 134 rh_mailing_list('usa-announce', 'announce/usa') + 135 rh_mailing_list('all-sales', 'sales') + 136 rh_mailing_list('devtools-build') + 137 rh_mailing_list('devtools-deploy') + 138 rh_mailing_list('devtools-lead') + 139 rh_mailing_list('devtools-saas') + 140 rh_mailing_list('devtools-pm') + 141 rh_mailing_list('devtools-architects') + 142 rh_mailing_list('devtools-team', 'devtools') + 143 rh_mailing_list('devx', 'devtools/devx') + 144 rh_mailing_list('serverless-interests', 'serverless') + 145 rh_mailing_list('serverless-dev', 'serverless/dev') + 146 google_groups('knative-dev', 'knative/dev') + 147 google_groups('knative-users', 'knative/users') + 148 google_groups('istio-dev', 'istio/dev') + 149 google_groups('istio-users', 'istio/users') + 150 rh_mailing_list('pipelines-interests', 'pipelines/interests') + 151 rh_mailing_list('pipelines-dev', 'pipelines/dev', false) + 152 rh_mailing_list('pipelines-extcomm', 'pipelines/dev', true) + 153 rh_mailing_list('pipelines-extcomm', 'pipelines/ext', true) + 154 rh_mailing_list('pipelines-bots', 'pipelines/bots', true) + 155 google_groups('tekton-dev', 'tekton/dev', false) + 156 google_groups('tekton-users', 'tekton/users', false) + 157 google_groups('tekton-governance', 'tekton/governance', false) + 158 google_groups('tekton-vmt', 'tekton/vmt', false) + 159 google_groups('tekton-code-of-conduct', 'tekton/code-of-conduct', false) + 160 rh_mailing_list('engineering-advocate', 'engineering-advocate') + 161 rh_mailing_list('engineering-advocate-nomination', 'engineering-advocate') + 162 google_groups('kubernetes-sig-cli', 'kubernetes/sig/cli') + 163 google_groups('operator-framework', 'operator/dev') + 164 google_groups('google-summer-of-code-mentors-list', 'gsoc/mentors') + 165 rh_mailing_list('cpaas-ops', '_tracker/cpaas') + 166 label_archive({from: 'do-not-reply@trello.com'}, '_tracker/trello') + 167 label_archive({from: 'help-ops@redhat.com'}, '_tracker/rh_service_now') + 168 label_archive({from: 'hss-jira@redhat.com'}, '_tracker/jira') + 169 label_archive({from: 'issues@jboss.org'}, '_tracker/jira') + 170 label_archive({from: 'jira@jira.prod.coreos.systems'}, '_tracker/jira') + 171 label_archive({from: 'kundenservice@egencia.de'}, '_tracker/egencia') + 172 label_archive({from: 'people-helpdesk@redhat.com'}, '_tracker/rh_service_now') + 173 label_archive({from: 'redhat@service-now.com'}, '_tracker/rh_service_now') + 174 label_archive({from: 'workflow@redhat.com'}, '_tracker/ebs_workflow') + 175 label_archive({from: 'orangehrmlive.com'}, '_tracker/orange') + 176 label_archive({from: 'concursolutions.com'}, '_tracker/concur') + 177 label_archive({from: 'errata@redhat.com'}, '_tracker/errata') + 178 label_archive({from: 'builds@travis-ci.com'}, '_build/travis') + 179 #label_archive({from: 'cvp-ops@redhat.com'}, '_build/cvp') + 180 label_archive({from: 'buildsys@redhat.com'}, '_build/buildsys') + 181 label_archive({from: 'meet-recordings-noreply@google.com'}, '_recordings') + 182 rh_mailing_list('bugzilla', '_tracker/bz') + 183 [ 184 { 185 filter: { 186 query: "list:(*.github.com)" 187 }, 188 actions: { 189 archive: true, 190 markRead: true, 191 labels: [ 192 "area/github" 193 ] 194 } 195 }, 196 { 197 filter: { 198 query: "list:(cvp-ops@redhat.com)" 199 }, 200 actions: { 201 archive: true, 202 markRead: true, 203 markSpam: false, 204 labels: [ 205 "_build/cvp" 206 ] 207 } 208 }, 209 { 210 filter: { 211 from: "noreply-cloud@google.com" 212 }, 213 actions: { 214 labels: [ 215 "cloud/google" 216 ] 217 } 218 }, 219 { 220 filter: { 221 from: "customercare@ecompanystore.com" 222 }, 223 actions: { 224 labels: [ 225 "area/order" 226 ] 227 } 228 }, 229 ], 230 labels: [ 231 { 232 name: "area/admin", 233 color: { 234 background: "#98d7e4", 235 text: "#0d3b44" 236 } 237 }, 238 { 239 name: "project/moby", 240 color: { 241 background: "#000000", 242 text: "#ffffff" 243 } 244 }, 245 { 246 name: "area/ce" 247 }, 248 { 249 name: "project/cdf" 250 }, 251 { 252 name: "event/kubecon", 253 color: { 254 background: "#b99aff", 255 text: "#ffffff" 256 } 257 }, 258 { 259 name: "status/waiting", 260 color: { 261 background: "#f2b2a8", 262 text: "#8a1c0a" 263 } 264 }, 265 { 266 name: "area/interview", 267 color: { 268 background: "#000000", 269 text: "#ffffff" 270 } 271 }, 272 { 273 name: "project/ocf", 274 color: { 275 background: "#b3efd3", 276 text: "#0b4f30" 277 } 278 }, 279 { 280 name: "event/redhat-summit", 281 color: { 282 background: "#fb4c2f", 283 text: "#ffffff" 284 } 285 }, 286 { 287 name: "area/training", 288 color: { 289 background: "#ffdeb5", 290 text: "#7a4706" 291 } 292 }, 293 { 294 name: "project/docker", 295 color: { 296 background: "#b6cff5", 297 text: "#0d3472" 298 } 299 }, 300 { 301 name: "area/learn", 302 color: { 303 background: "#e3d7ff", 304 text: "#3d188e" 305 } 306 }, 307 { 308 name: "area/health" 309 }, 310 { 311 name: "area/expense", 312 color: { 313 background: "#ffc8af", 314 text: "#7a2e0b" 315 } 316 }, 317 { 318 name: "area/opensource", 319 color: { 320 background: "#b3efd3", 321 text: "#0b4f30" 322 } 323 }, 324 { 325 name: "area/meetup" 326 }, 327 { 328 name: "area/conference", 329 color: { 330 background: "#e3d7ff", 331 text: "#3d188e" 332 } 333 }, 334 { 335 name: "area/travel", 336 color: { 337 background: "#fbe983", 338 text: "#594c05" 339 } 340 }, 341 { name: "Notes" }, 342 ] + lib.rulesLabels(self.rules), 343 }