Skip to content

Commit 5986203

Browse files
committed
Added opt-out capabilities.
Now contributers will be able to opt out of recieving a reward, such as when submitting minor typo fixes. Implemented @moxie0 's request re comments and asterisks in opt-out method fixed README to reflect lack of asterisks in Opt-out Addressed @moxie0's request re freebie and parens
1 parent b0b5815 commit 5986203

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ BitHub
55

66
BitHub is a service that will automatically pay a percentage of Bitcoin funds for every submission to a GitHub repository.
77

8+
Opting Out
9+
----------
10+
11+
If your conscience is troubled at recieving payment for changing a few lines of documentation, simply add "FREEBIE" to your commit message, and you will not recieve BTC for that commit.
12+
13+
814
Building
915
-------------
1016

src/main/java/org/whispersystems/bithub/controllers/GithubController.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,9 @@ private List<Commit> getQualifyingCommits(PushEvent event) {
146146
logger.info(commit.getUrl());
147147
if (!emails.contains(commit.getAuthor().getEmail())) {
148148
logger.info("Unique author: "+ commit.getAuthor().getEmail());
149-
if (commit.getMessage() == null || !commit.getMessage().startsWith("Merge")) {
150-
logger.info("Not a merge commit...");
149+
if (commit.getMessage() == null || (!commit.getMessage().startsWith("Merge") && !commit.getMessage().contains("FREEBIE"))) {
150+
logger.info("Not a merge commit or freebie...");
151+
151152
emails.add(commit.getAuthor().getEmail());
152153
commits.add(commit);
153154
}

0 commit comments

Comments
 (0)