From 31a84e051f2440ad6b863d4c7fa47bb54fca9266 Mon Sep 17 00:00:00 2001
From: Kristian Klausen <kristian@klausen.dk>
Date: Fri, 11 Jun 2021 16:24:06 +0200
Subject: [PATCH] Add webhook when creating read-only GH mirrors which closes
 PRs

Fix #80
---
 .../issue_templates/New Official Project.md   |  5 ++
 misc/vault_github.yml                         | 53 ++++++++++++-------
 2 files changed, 38 insertions(+), 20 deletions(-)

diff --git a/.gitlab/issue_templates/New Official Project.md b/.gitlab/issue_templates/New Official Project.md
index 91cb22104..4d06fe89e 100644
--- a/.gitlab/issue_templates/New Official Project.md	
+++ b/.gitlab/issue_templates/New Official Project.md	
@@ -85,6 +85,11 @@ If you want to add a new official project, here are some guidelines to follow:
    - `Wiki`
    - `Issues`
    - `Projects`
+1. [ ] Go to https://github.com/archlinux/my-example/settings/hooks and add a new webhook
+   - `Payload URL`: `$(misc/get_key.py misc/vault_github.yml github_pull_closer_webhook_url)`
+   - `Content type`: `application/json`
+   - `Which events would you like to trigger this webhook?`
+     - `Let me select individual events.`: `Pull requests`
 1. [ ] In the GitHub description of the mirrored project, append " (read-only mirror)" so that people know it's a mirror.
 1. [ ] Disable `Packages` and `Environments` from being shown on the main page.
 1. [ ] In the website field put the full url to the repository on our GitLab.
diff --git a/misc/vault_github.yml b/misc/vault_github.yml
index e57e7e922..76430a8cb 100644
--- a/misc/vault_github.yml
+++ b/misc/vault_github.yml
@@ -1,21 +1,34 @@
 $ANSIBLE_VAULT;1.1;AES256
-33623431303030613732373261366564343339366231386166323062303232383135636437363739
-3931333366613637623938313661393434663130323039360a663564663438636665666632323166
-63386634636461626234653233666362376530326135636130366465343661363731393266636638
-3131313235306262660a333230616130633637306638623438636532623534313038633031633135
-33636335336638373835363734376564323234353339333066376562356530353364313031356166
-65363735313464616462396639303534623937363135386335316334323066316561313865633235
-65363063356262656566666164646330363665613136663730656165346161323437616437373366
-65323836636166373464616461633838343030353036353235363738343363396534306236653134
-61613064363131393530623637356363373236646539356135396535376235313561616235393462
-38646434393164626262633339656235333034386663316264613831303638643466383131643361
-30303661393362396137333832343163393561653563396333636232633339353261663733653232
-64343664616566616430323539643266663233373833373235646330633435316134393265303165
-63626162393665383065323232336232626438316164326634333939643566393238326166353939
-65653530663439393061346637323363623731323631626433623765303366376665306136623831
-37373266663433363432336663333335393933303038366561613737366665613237326666386438
-35323839393236643239663337356631613038356534303733666238316666393034623733303563
-62373563353365343230666462363035356530366536353139663339313065396231653663383433
-30653236316164353836636632363962393132343864333132303530326139386439636331303362
-36313232383264656666386632643364363835383163663165616163366334343830663362393737
-32363565633833623937
+63303766353166313665353834656537616437396338333965333363656639316431613838653765
+3236373532383033353065356234333936613861616632650a306436323264626230343233346130
+33316636633366613831316366666334356330323130653430653032663461323538623039643365
+6530393963333032640a663939353539636263356438626139616130643835666533323562623766
+33653830346430653737633839333730373030333663366630396163666561633135343839653930
+63666237666264376166336134323566316537343437343133656136356130623731653734373137
+61643962613833613537653565646433323136663364653231623861626164663963356137623163
+31613463636137356563653138353764303162376132373336333662666662323533643261313531
+33643538656364663939373062613262636164306363366131356137643264643130313830383364
+61633637363565623738663934363133376638653463326130333539316263316362376235643235
+65333031643761323533633165323237633062313363643131656365396431313462396334376438
+64393239393634663438356334346239353132313038653264363361313566316233376566623466
+31373635626562393962396137326431653665336362653663643866373935386438366438356237
+66333332643039623536623334653233346539633763303337363961346533643335373536363363
+66653366613262626337653861663636383630653561303231336639656438383638633062346139
+32383262373032373438653364646564643538363564393638333063363738643131613432356337
+65646161306665653861633733626234643133366435306338353937376338303533663165363834
+39303131356632386537646238666339323136656432393633303437313833353565353963323436
+36326132616431616563373333326630306235373438643838646265363031383631616430663033
+66636365373961386339396236633162313861383566636566303265303331373036303561343834
+37663235343136386530353839643766326561306435663339356464316533383863356661363362
+35643236653931303135383939326163656461616330366339623166623837343961373366613566
+64396231316130623730333165376165313063653561626165613734396634346331623135336264
+63653931316537346337366561303962383031396665316634653836306663306363633766646439
+34636236623338353732356639613162306663356336343663303361326231646363346634366139
+31343035336662613633323935376631616664313561626165343931353436323665366466323234
+62373434633830666461343862323933366366333332353762663333666662646163653039643065
+62613635383266373232383133363737313335353637333666313138303964633862363632623235
+35623763386239323031623437373836303538613737636537396634666462303531626564393132
+65313136306231363933393064366636393830306436643462656238353134393761326665306231
+62356562633964306265363235396139636532653462306432316632633065323532353865646530
+33326663313537643133366362653361616134643963343139373364633636636564313834616239
+3964
-- 
GitLab