Skip to content

Commit

Permalink
fix #6 ignore has_in_collaborators (#7)
Browse files Browse the repository at this point in the history
* fix #6 ignore has_in_collaborators

* remove not used var
  • Loading branch information
lucemia authored Jun 14, 2024
1 parent f5302c2 commit df90b47
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/pr_lint/linter.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@ def lint(pr: PullRequest) -> None:
pr: The pull request to lint
"""

title = pr.title
repo = pr.base.repo

pr_owners = re.findall(r"(@[\w]+)$", title)
pr_owners = re.findall(r"(@[\w]+)$", pr.title)
assert pr_owners, "PR title should end with a GitHub username"
pr_owner = pr_owners[0][1:]
assert repo.has_in_collaborators(pr_owner), f"{pr_owner} is not a collaborator"
# FIXME: for some reason the has_in_collaborators method is not working
# pr_owner = pr_owners[0][1:]
# assert repo.has_in_collaborators(pr_owner), f"{pr_owner} is not a collaborator"

labels = pr.get_labels()

Expand Down

0 comments on commit df90b47

Please sign in to comment.