Skip to content

Upgrade Octokit authentication to fix deprecation warnings#1344

Merged
Arif-Khalid merged 4 commits intoCATcher-org:masterfrom
yucongkoo:1343-deprecation-notice-appearing-in-catcher-log
Mar 15, 2025
Merged

Upgrade Octokit authentication to fix deprecation warnings#1344
Arif-Khalid merged 4 commits intoCATcher-org:masterfrom
yucongkoo:1343-deprecation-notice-appearing-in-catcher-log

Conversation

@yucongkoo
Copy link
Copy Markdown
Contributor

@yucongkoo yucongkoo commented Mar 10, 2025

Summary:

Fixes #1343

Changes Made:

  • Upgraded @octokit/rest to v17
  • Included new package @octokit/auth-oauth-user for indicating authStrategy used
  • Fix typo in logging

Proposed Commit Message:

Upgrade @octokit/rest to v17

@octokit/rest v16 uses a format that will be 
deprecated starting from v17 to construct
an Octokit object, and will cause authentication
request to fail.

Let's upgrade the octokit version to v17
and use the new format so that future upgrades
can happen more smoothly.

@yucongkoo yucongkoo self-assigned this Mar 10, 2025
@yucongkoo
Copy link
Copy Markdown
Contributor Author

After upgrading @octokit/rest to v17, authentication will fail as follows:

Screen.Recording.2025-03-10.at.2.11.50.PM.mov

After my changes adding in the authStrategy option, authentication now can success:

Screen.Recording.2025-03-10.at.2.13.44.PM.mov

Copy link
Copy Markdown
Contributor

@Arif-Khalid Arif-Khalid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good research into the issue and an excellent resolution.
Everything remains working, good work!
Just a minor update to a renamed library method required.

"@octokit/rest": "^16.37.0",
"@octokit/auth-oauth-user": "^2.1.2",
"@octokit/core": "^4.2.1",
"@octokit/rest": "^17.11.0",
Copy link
Copy Markdown
Contributor

@Arif-Khalid Arif-Khalid Mar 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The newer version of octokit has resulted in the additional error of GithubService: octokit.repos.getContents() has been renamed to octokit.repos.getContent() showing up in the logs.
Please change the method call in GithubService to reflect the updated name.

Copy link
Copy Markdown
Contributor

@Arif-Khalid Arif-Khalid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great PR LGTM!

@Arif-Khalid Arif-Khalid merged commit 5f13d93 into CATcher-org:master Mar 15, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deprecation notice appearing in CATcher log

2 participants