Skip to content

Commit

Permalink
Merge pull request #213 from Zyzyx/main
Browse files Browse the repository at this point in the history
some light comment clean up
  • Loading branch information
Zyzyx authored Oct 2, 2024
2 parents f6c88df + c4fa8a5 commit 3cd20c0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion sync2jira/upstream_issue.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ def handle_github_message(msg, config, pr_filter=True):
owner = msg['msg']['repository']['owner']['login']
repo = msg['msg']['repository']['name']
upstream = '{owner}/{repo}'.format(owner=owner, repo=repo)
mapped_repos = config['sync2jira']['map']['github']

mapped_repos = config['sync2jira']['map']['github']
if upstream not in mapped_repos:
log.debug("%r not in Github map: %r", upstream, mapped_repos.keys())
return None
Expand Down
2 changes: 0 additions & 2 deletions sync2jira/upstream_pr.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,10 @@ def handle_github_message(msg, config, suffix):
:returns: Issue object
:rtype: sync2jira.intermediary.PR
"""
# Create our title (i.e. owner/repo)
owner = msg['msg']['repository']['owner']['login']
repo = msg['msg']['repository']['name']
upstream = '{owner}/{repo}'.format(owner=owner, repo=repo)

# Check if upstream is in mapped repos
mapped_repos = config['sync2jira']['map']['github']
if upstream not in mapped_repos:
log.debug("%r not in Github map: %r", upstream, mapped_repos.keys())
Expand Down
6 changes: 3 additions & 3 deletions tests/test_upstream_issue.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,15 @@ def setUp(self):
}
}

# Mock Github Reporter
# Mock GitHub Reporter
self.mock_github_person = MagicMock()
self.mock_github_person.name = 'mock_name'

# Mock Github Repo
# Mock GitHub Repo
self.mock_github_repo = MagicMock()
self.mock_github_repo.get_issue.return_value = self.mock_github_issue

# Mock Github Client
# Mock GitHub Client
self.mock_github_client = MagicMock()
self.mock_github_client.get_repo.return_value = self.mock_github_repo
self.mock_github_client.get_user.return_value = self.mock_github_person
Expand Down
6 changes: 3 additions & 3 deletions tests/test_upstream_pr.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,16 @@ def setUp(self):
}
}

# Mock Github Reporter
# Mock GitHub Reporter
self.mock_github_person = MagicMock()
self.mock_github_person.name = 'mock_name'

# Mock Github Repo
# Mock GitHub Repo
self.mock_github_repo = MagicMock()
self.mock_github_repo.get_pull.return_value = self.mock_github_pr
self.mock_github_repo.get_issue.return_value = self.mock_github_pr

# Mock Github Client
# Mock GitHub Client
self.mock_github_client = MagicMock()
self.mock_github_client.get_repo.return_value = self.mock_github_repo
self.mock_github_client.get_user.return_value = self.mock_github_person
Expand Down

0 comments on commit 3cd20c0

Please sign in to comment.