pozil / auto-assign-issue

GitHub Action that auto-assigns issues or PRs to one or more users
Creative Commons Zero v1.0 Universal
53 stars 28 forks source link

Ensuring a PR cannot be assigned to the creator #54

Closed agomezmoron closed 2 years ago

agomezmoron commented 2 years ago

I checked in repositories with not too many people, the probability to assign the PR to the creator is too high. Adding a way to exclude the author by using the allowSelfAssign implementation and adding a new condition in the if flow remove the author from the asignees list.

On the other hand, fixing the payload when requesting the POST action to assign reviewers. A false positive was being raised in the GH result but after testing with postman it worked.

The tests were adapted too.

codecov[bot] commented 2 years ago

Codecov Report

Merging #54 (fc785c2) into v1 (fff0a74) will decrease coverage by 0.64%. The diff coverage is n/a.

@@            Coverage Diff             @@
##               v1      #54      +/-   ##
==========================================
- Coverage   91.02%   90.38%   -0.65%     
==========================================
  Files           1        1              
  Lines          78      104      +26     
  Branches       23       30       +7     
==========================================
+ Hits           71       94      +23     
- Misses          7       10       +3     
Impacted Files Coverage Δ
src/action.js 90.38% <0.00%> (-0.65%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 68813ae...fc785c2. Read the comment docs.

pozil commented 2 years ago

Good contrib, thanks once more @agomezmoron