Skip to content

Commit

Permalink
#71 reward only when merged
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Jul 7, 2024
1 parent 717fc3e commit 0d5f6ed
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
5 changes: 5 additions & 0 deletions judges/code-review-was-rewarded/code-review-was-rewarded.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@
(exists repository)
(exists who)
(eq is_human 1)
(join 'merged_when<=when' (and
(eq what 'pull-was-merged')
(eq issue $issue)
(eq repository $repository)))
(exists merged_when)
(empty (and
(eq what '#{$judge}')
(eq where $where)
Expand Down
10 changes: 9 additions & 1 deletion judges/code-review-was-rewarded/reward-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ input:
what: pmp
area: hr
days_to_reward: 99999
-
_id: 3
what: pull-was-merged
where: github
issue: 42
repository: 100
who: 4535
when: 2024-05-20T23:54:24Z
-
_id: 1
cause:
Expand All @@ -46,7 +54,7 @@ input:
The bug was accepted some time ago, this is why this fact is here.
The bug was accepted some time ago, this is why this fact is here.
expected:
- /fb[count(f)=3]
- /fb[count(f)=4]
- /fb/f[what='code-review-was-rewarded']
- /fb/f[who='4444']
- /fb/f[issue='42']
Expand Down

0 comments on commit 0d5f6ed

Please sign in to comment.