Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR Owners can change their minds #77

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Votes on a PR are sourced through the following mechanisms:
* A comment that contains :+1: or :-1: somewhere in the body
* A :+1: or :-1: reaction on the PR itself
* An accept/reject [pull request review](https://help.github.com/articles/about-pull-request-reviews/)
* The PR itself counts as :+1: from the owner
* The PR itself counts as :+1: from the owner, unless they later add a :-1: reaction/comment.

### Weights and thresholds

Expand Down
6 changes: 4 additions & 2 deletions github_api/voting.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ def get_votes(api, urn, pr):
if vote and vote_owner != pr_owner:
votes[vote_owner] = vote

# by virtue of creating the PR, the owner casts his vote as 1
votes[pr_owner] = 1
# by virtue of creating the PR, the owner casts their vote as 1
# unless they later vote against it, in which case we respect that
if votes.get(pr_owner) != -1:
votes[pr_owner] = 1

return votes

Expand Down