apertium / phenny

This is a port of phenny, a Python IRC bot, to Python3. This specific version, called begiak, is a fork of the Wadsworth version, used by the apertium project.
http://wiki.apertium.org/wiki/Begiak
Other
16 stars 42 forks source link

Ignore repos list #395

Closed sushain97 closed 6 years ago

sushain97 commented 6 years ago

There should be a config option for which repos to ignore events from. apertium-all, apertium-trunk, etc.

ftyers commented 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.

Androbin commented 6 years ago

Current behavior:

Androbin commented 6 years ago

If we want to ignore all events from repo X, why don't we just disable the event hook in the repo settings?

sushain97 commented 6 years ago

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.

Androbin commented 6 years ago

Okay, get it. What parameters do we want? When shall messages be sent to which channels?

ftyers commented 6 years ago

The ideal thing would be to have a per-channel, per-repo whitelist/blacklist of events.

E.g. on #apertium only publish:

whitelist:

blacklist:

jonorthwash commented 6 years ago

@Androbin, could you provide the config line(s) for the behaviour @ftyers requests above?

Androbin commented 6 years ago

@jonorthwash See #396 for that.

jonorthwash commented 6 years ago

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?

sushain97 commented 6 years ago

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': [],
}
jonorthwash commented 6 years ago

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
jonorthwash commented 6 years ago

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': [],
}
Androbin commented 6 years ago

Oops, I know what's wrong there...

Androbin commented 6 years ago

Fixed in 36453f54494cfd3a8b57f974d05845a08d55d3e7