Skip to content

Commit 566d23c

Browse files
committed
refactor: better variable name & remove unnecessary variable
1 parent 6a09fc4 commit 566d23c

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

.github/workflows/force-merge.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,11 @@ jobs:
4949
5050
const votes = new Map();
5151
for(const comment of comments.data) {
52-
const hasPermissions = comment.author_association === 'MEMBER' || comment.author_association === 'OWNER'
52+
const hasVotingRights = comment.author_association === 'MEMBER' || comment.author_association === 'OWNER'
5353
const hasCastedVote = comment.body === '/force-merge'
5454
55-
if(hasPermissions && hasCastedVote) {
56-
const username = comment.user.login
57-
votes.set(username, comment.author_association);
55+
if(hasVotingRights && hasCastedVote) {
56+
votes.set(comment.user.login, comment.author_association);
5857
}
5958
}
6059

0 commit comments

Comments
 (0)