Added hashtag-based tiers for payouts, solves #11#23
Conversation
|
We need to allow project maintainers to customize reward size, so we need to check a merge commit's message. This doesn't solve #11. |
|
There also could be several commits in one pull request, and it's still not clear how to deal with this situation. |
|
Hmm -- I do think it solves #11, at least according to what @arsenische said. It does not allow maintainers to fully customize reward size (which @arsenische said may be undesirable) but does allow much more granularity. What should be changed about my code to make it solve #11? |
|
Oops, accidentally closed the request. Reopened. |
|
@Gnewt submitted the code that allows author of commit to specify the reward size. I like the way he did it. @AlexandrZ says that it doesn't solve #11 because project maintainers (but not authors of commit) should evaluate commits. And I agree with him. When developer makes a pull request, project maintainer should be able to merge it with a hashtag in commit message. That hashtag should affect reward for commits that are included in the pull request. So my opinion is that @Gnewt's solution doesn't close #11, but it somewhat helps (because project maintainer may refuse to merge pull request if s/he thinks hashtags are wrong). Any ideas how we could apply the hashtag in the merge commit message to all commits inside the pull request? |
|
Ah, I was mistaken in my understanding of the way GitHub handles commit messages. You guys are correct in that the committer gets to pick the tier. Maintainers could always reject inappropriate hashtags, but I think project maintainers should be able to choose a tier. I have an idea of how to do this. Currently we ignore all the "Merge blablabla" commits, but perhaps we could examine the description of the "Merge pull request" commit, and if it contains a hashtag, figure out which commits are in that pull request and apply that multiplier to those commits. Thoughts? I'm not sure how else to do it, it seems that the "extended description" of the "Merge pull request" commit is the easiest way a maintainer can attach information to a merged pull request. |
|
I'll try to code this up tonight and see if I can get it working. Octokit provides the tools pretty easily. |
|
Solved by #70 |
Tiers will be decided based on the first hashtag encountered in a commit. If there is no hashtag or the hashtag is not in the list of tiers, the multiplier will be 1 (so fully standard). If there is a hashtag in the commit message that matches the tiers in
config.yml, that multiplier will be applied to the tip amount. I included inconfig.yml.samplethe tiers that were discussed in issue #11, but tiers are fully user-configurable.