github-activity icon indicating copy to clipboard operation
github-activity copied to clipboard

Duplication of tag definitions

Open consideRatio opened this issue 5 years ago • 2 comments

It seems like this repo contain a duplicate set of definitions for what tags it considers special.

In github_activity.py there is a constant called TAGS_METADATA_BASE, but there is also tags.yaml. In conf.py it seems we rely on the python constant rather than the yaml file which I don't think is referenced anywhere.

I suggest we rely on the yaml file by default.


As a separate point, but if we rely on a YAML file to define what tags are valid, we could quite easily also allow for someone to pass a configuration to the github activity CLI etc allowing them to use custom tags and categories.

At this point, I'd like to have a CI category or similar. I'm not sure... Perhaps not listing any PRs marked CI would make more sense for a changelog? If something is CI, it doesn't matter at all to the changelog in my mind.

To Do

  • Replace the python dictionary here: https://github.com/executablebooks/github-activity/blob/master/github_activity/github_activity.py#L17
  • With a read-in from tags.yml here: https://github.com/executablebooks/github-activity/blob/master/github_activity/tags.yaml

consideRatio avatar Jan 10 '21 18:01 consideRatio

I think a YAML file sounds great to me - it would basically contain the mapping from "tags + keywords" -> categories, yeah?

choldgraf avatar Jan 11 '21 12:01 choldgraf

Silly me, I just realized that tags.yml already exists. I updated the top comment with next steps

choldgraf avatar Feb 27 '21 21:02 choldgraf