con / solidation

Produce activities reports from GitHub
MIT License
0 stars 0 forks source link

New feature: be able to provision separate section(s) based on label(s) #17

Open yarikoptic opened 1 year ago

yarikoptic commented 1 year ago

E.g.

custom_sections:
- name: Easy work needing help
  types: [pull, issue]
  labels: easy, contribution-desired

to create a section which would collate Pull requests and Issues which have both labels easy and contribution-desired. It would then be useful to annotate/be able to find work which anyone in the team could pick up "when bored" or just to improve the greenness of their github profiles.

as for selection, I wonder if may be it could be generalized a little more exposing internal structure but making it also flexible

custom_sections:
- name: Easy work needing help
  condition: 'easy' in thing.labels and 'contribution-desired' in thing.labels"

where thing would be an issue (from self.active_issues) or a PR (from self.open_prs).

WDYT @jwodder ?

jwodder commented 1 year ago

@yarikoptic I don't like the idea of running arbitrary Python code read from a config file.

yarikoptic commented 1 year ago

A defense case: it is not "arbitrary" as cannot be provided by a possibly malicious "external" user. Here it is a part of the configuration file destined for execution by that user and if user can modify that file, he can as well modify the software directly or do that harm directly. We similarly expose for eval in datalad foreach-dataset and so far had no issue with that.