Closed sushain97 closed 6 years ago
This seems fairly straightforward in git.py line 150. do_POST_unsafe(self, data)
. All of that code should be customisable, e.g. send the event, message etc.
Current behavior:
if master and not fork
-> default channelelse
-> branch channelsIf we want to ignore all events from repo X, why don't we just disable the event hook in the repo settings?
If we want to ignore all events from repo X, why don't we just disable the event hook in the repo settings?
That isn't possible, unfortunately. The webhook is at the org level and it will continue to be.
Okay, get it. What parameters do we want? When shall messages be sent to which channels?
The ideal thing would be to have a per-channel, per-repo whitelist/blacklist of events.
E.g. on #apertium
only publish:
whitelist:
blacklist:
@Androbin, could you provide the config line(s) for the behaviour @ftyers requests above?
@jonorthwash See #396 for that.
So the last example there is exactly what @ftyers was asking for? If I test it, will I get the behaviour he asked for above?
No, ours should be more like:
git_events = {
'*': ['push'],
'apertium/*': ['issue', 'push'],
'apertium/apertium-all': [],
'apertium/apertium-incubator': [],
'apertium/apertium-nursery': [],
'apertium/apertium-staging': [],
'apertium/apertium-trunk': [],
'apertium/apertium-tools': [],
}
We're still getting these commits:
(14:56:21) begiak: apertium-incubator: sushain97 * apertium-byv-fra: Sync submodules (1U, 0D, 0A) Updated: apertium-byv-fra. Deleted: None. Added: None. https://github.com/apertium/apertium-incubator/commit/2d4701
and
(14:56:36) begiak: apertium-all: sushain97 * apertium-incubator: Sync submodules (1U, 0D, 0A) Updated: apertium-incubator. Deleted: None. Added: None. https://github.com/apertium/apertium-all/commit/4bf649
This is what I have in the config:
git_events = {
'*': ['push'],
'apertium/*': ['issue', 'push'],
'apertium/apertium-all': [],
'apertium/apertium-incubator': [],
'apertium/apertium-nursery': [],
'apertium/apertium-staging': [],
'apertium/apertium-trunk': [],
'apertium/apertium-tools': [],
}
Oops, I know what's wrong there...
Fixed in 36453f54494cfd3a8b57f974d05845a08d55d3e7
There should be a config option for which repos to ignore events from.
apertium-all
,apertium-trunk
, etc.