[UPD] Modify the authentification process to Github

Now use a sole Github access for whole Odoo users, set in the General Configuration
This commit is contained in:
Stéphan Sainléger
2022-07-01 09:52:30 +02:00
parent 42867f0bb0
commit 194422e2a9
7 changed files with 43 additions and 25 deletions

View File

@@ -18,7 +18,7 @@ class CreateGitIssue(models.TransientModel):
def _create_git_issue(self):
values = super(CreateGitIssue, self)._create_git_issue()
if self.issue_platform.tool == "github":
github = Github(self.env.user.github_token)
github = Github(self.env.user.company_id.github_token)
repo = github.get_repo(self.issue_repo.displayed_name)
issue = repo.create_issue(
title=self.issue_name, body=self.issue_description