OSS-Docs-Tools / code-owner-self-merge

A GitHub Action for letting CODEOWNERS merge PRs via green PR reviews
MIT License
53 stars 16 forks source link

Do not early return when no relevant code owner exists #40

Closed saschanaz closed 6 months ago

saschanaz commented 1 year ago

Fixes #39

I'd like to have a test but this doesn't really fit into the existing unit tests.

saschanaz commented 1 year ago

The tests pass locally, what does it mean by unexpected token? How can it happen? 🤔

orta commented 1 year ago

Hah, no idea about that jest error - maybe a weird npx issue?

I think I'd prefer if the label code just moves up above the return instead, mainly so that it's still really obvious that it's not going to accidentally do any work in the fn if no users are found

saschanaz commented 1 year ago

I think I'd prefer if the label code just moves up above the return instead, mainly so that it's still really obvious that it's not going to accidentally do any work in the fn if no users are found

Isn't it obvious as the code still returns inside if (!ownersWhoHaveAccessToAllFilesInPR.length)?

orta commented 6 months ago

👍🏻