Skip to content

Commit a43f7c2

Browse files
Bump pygithub from 1.58.2 to 2.6.1 (#11886)
* Bump pygithub from 1.58.2 to 2.6.1 Bumps [pygithub](https://github.com/pygithub/pygithub) from 1.58.2 to 2.6.1. - [Release notes](https://github.com/pygithub/pygithub/releases) - [Changelog](https://github.com/PyGithub/PyGithub/blob/v2.6.1/doc/changes.rst) - [Commits](PyGithub/PyGithub@v1.58.2...v2.6.1) --- updated-dependencies: - dependency-name: pygithub dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * github auth: use pygithub2.x auth params --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Valentijn Scholten <valentijnscholten@gmail.com>
1 parent 8e75d9d commit a43f7c2

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

dojo/github.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from django.template.loader import render_to_string
66

77
# External libs
8-
from github import Github
8+
from github import Auth, Github
99

1010
# Dojo related imports
1111
from dojo.models import Engagement, GITHUB_Issue, GITHUB_PKey, Product
@@ -33,7 +33,7 @@ def reopen_external_issue_github(find, note, prod, eng):
3333
g_issue = GITHUB_Issue.objects.get(finding=find)
3434

3535
try:
36-
g_ctx = Github(github_conf.api_key)
36+
g_ctx = Github(auth=Auth.Token(github_conf.api_key))
3737
repo = g_ctx.get_repo(github_product.git_project)
3838
issue = repo.get_issue(int(g_issue.issue_id))
3939
except:
@@ -64,7 +64,7 @@ def close_external_issue_github(find, note, prod, eng):
6464
g_issue = GITHUB_Issue.objects.get(finding=find)
6565

6666
try:
67-
g_ctx = Github(github_conf.api_key)
67+
g_ctx = Github(auth=Auth.Token(github_conf.api_key))
6868
repo = g_ctx.get_repo(github_product.git_project)
6969
issue = repo.get_issue(int(g_issue.issue_id))
7070
except:
@@ -95,7 +95,7 @@ def update_external_issue_github(find, prod, eng):
9595
g_issue = GITHUB_Issue.objects.get(finding=find)
9696

9797
try:
98-
g_ctx = Github(github_conf.api_key)
98+
g_ctx = Github(auth=Auth.Token(github_conf.api_key))
9999
repo = g_ctx.get_repo(github_product.git_project)
100100
issue = repo.get_issue(int(g_issue.issue_id))
101101
issue.edit(title=find.title, body=github_body(find), labels=["defectdojo", "security / " + find.severity])
@@ -130,7 +130,7 @@ def add_external_issue_github(find, prod, eng):
130130
logger.info("Create issue with github profile: " + str(github_conf) + " on product: " + str(github_product_key))
131131

132132
try:
133-
g = Github(github_conf.api_key)
133+
g = Github(auth=Auth.Token(github_conf.api_key))
134134
user = g.get_user()
135135
logger.debug("logged in with github user: " + user.login)
136136
logger.debug("Look for project: " + github_product_key.git_project)

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ djangorestframework==3.16.0
2626
html2text==2025.4.15
2727
humanize==4.12.3
2828
jira==3.8.0
29-
PyGithub==1.58.2
29+
PyGithub==2.6.1
3030
lxml==6.0.0
3131
Markdown==3.8.2
3232
openpyxl==3.1.5

0 commit comments

Comments
 (0)