Skip to content
This repository has been archived by the owner on Aug 16, 2023. It is now read-only.

Add configuration options to allow filtering of self-owned repositories #65

Closed
danisyellis opened this issue Oct 16, 2020 · 2 comments · Fixed by #70
Closed

Add configuration options to allow filtering of self-owned repositories #65

danisyellis opened this issue Oct 16, 2020 · 2 comments · Fixed by #70
Labels

Comments

@danisyellis
Copy link
Collaborator

danisyellis commented Oct 16, 2020

Currently Starfish does not filter out events in personal repositories. Future users may want to exclude contributions into personal repositories (defined here as "any repository owned by the user who triggered the event"). We should add configuration options that allow future users to easily implement their own policies regarding where events will be counted.

The simplest version of this would be to:

Add a variable to the .env.template:

Filter Out Events In User-Owned Repos? (true or false, default to false)
Add a new filterEventsFor function that filters the events based off this variable.

Add documentation in the README for using this env variable.

@danisyellis
Copy link
Collaborator Author

For anyone thinking of working on this issue, feel free to submit a PR for just the work in the initial description above!
Or you can do that piece and then add in more code to support the feature I describe below:

Optional addition: some percentage of self-owned repos are not simply practice projects, but instead are actual open source projects that other people contribute to and use.
Therefore, it would be nice to add an optional check that looks to see if anyone else has contributed to the self-owned project and, if so, (maybe if two other people have contributed?), includes it even though it's self-owned. Alternately, we could have it check to see if the repo has been starred by more than 2 people.
It would be best if this filter was both optional and customizable so that each Starfish user could decide what criteria they want to use.

For Starfish users and potential users: What do you think of this idea? Would it be useful? How would you determine that a specific self-owned repo is actually a viable, useful open source project (as opposed to just someone's practice code or portfolio piece that they're storing on GitHub as backup)

@danisyellis
Copy link
Collaborator Author

fyi, while researching something else, I noticed that each event has an "author_association", for example author_association": "NONE" or "author_association": "OWNER"

This might be the best way to find out if it's the persons own repo or not.

(I checked and for example, for Starfish, because it's owned by indeedeng, not danisyellis, I'm a "collaborator" not an "owner", so even if we filtered out repos owned by the author of the event, I would still get credit for my contributions to Starfish, a project I maintain, which is the behavior we're looking for.

API documentation is here if you need it https://developer.github.com/v3/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant