skymoore / required-approvals

Github Action to check PR approvals and codeowners
7 stars 6 forks source link

Fix bug where team name is being compared with team slug #14

Closed scottcarter87 closed 1 month ago

scottcarter87 commented 2 months ago

The code was erroneously comparing team name with the team slug which resulted in an otherwise approved PR not passing the check. The CODEOWNERS file must take team slugs instead of team names which is where the issue arises from. Consider the following example.

Team Name: "com.example.some name" Slug: "com-example-some-name"

CODEOWNERS File * @owner-name/com-example-some-name

The code was taking the team name of "com.example.some name" and replacing only spaces with "-" which resulted in the code trying to compare "com.example.some-name" with "com-example-some-name" which then resulted in the check failing.

skymoore commented 1 month ago

@scottcarter87 Thank you for the contribution. I will cut a release with this today.

skymoore commented 1 month ago

@scottcarter87 v4.2.1