-
Notifications
You must be signed in to change notification settings - Fork 996
Add configurable GitHub Enterprise API base URL for key checks and API calls #3597
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
SuyashJain17
wants to merge
43
commits into
augurlabs:main
from
SuyashJain17:feat/github-enterprise-api-support
Closed
Changes from all commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
fca8484
Fix #3474: Add default value for AUGUR_DOCKER_DEPLOY to prevent Attri…
guptapratykshh 3735f4a
Implement batched processing for collecting pull request review comme…
shlokgilda 70f0512
allow config sources in the config class to be overridden via a param…
MoralCode e404016
Write unit test demonstrating the problem
MoralCode eda4376
modify the test to utilize load_config, since thats whats relied on f…
MoralCode f1e490e
Fix the issue
MoralCode 94da419
improve how JsonSource's identify themselves in the logs
MoralCode 242a104
prevent accidental modification of JSON config values from externally
MoralCode 7c3e04f
add docs for the init parameters
MoralCode b7c38cc
remove path tracking
MoralCode 264ff98
(fix): remove no else raise and no else return rules from .pylintrc
pushpitkamboj e2d0a3e
Remove stale explorer_libyear_detail refresh
iGufrankhan c007674
fix test for retrieving the correct dict
MoralCode 7631a40
add and fix test case for verifying write protection for the JSON config
MoralCode 4089389
add CI job for running the unit tests with pytest
MoralCode ba60a45
Disable tests for 3.12+ so they work
MoralCode 4a73184
add timeout value for the job
MoralCode 1486df7
Deleted the augur-retired-sql.schema file
Noaman-Akhtar 96f8863
pass through follow_redirects parameter in hit_api so clients can cha…
MoralCode 07b97a2
dont follow redirects when checking github move
MoralCode e97cf27
avoid dangerous modification of sqalchemy internal representations wh…
MoralCode bddae5e
perform timeout check before trying to access the response object
MoralCode 310a21f
replace wildcard import with importing the relevant objects
MoralCode 0831b0a
handle extreme edge case of a 301 redirect with no location field by …
MoralCode d3c739a
stop retrying the request if any response codes from github are recei…
MoralCode df1d527
add missing repo_id value
MoralCode d213aea
ok turns out the limited dict stuff broke and is causing nulls in the db
MoralCode 6794f31
use custom exception types to bubble the exceptions up a level and ca…
MoralCode a7d012d
First draft of new database table for repo_aliases
MoralCode 57f1e99
add code in update_repo_with_dict that adds values to the new repo_al…
MoralCode edae9c8
seems like retry needs a value passed into it.
MoralCode 2f7ca16
Add migration for new table
MoralCode 18e7b40
feat: add GitHub Enterprise API support (#3277)
SuyashJain17 8f617f0
fix: resolve pylint linting errors
SuyashJain17 ba57d51
Revert database url retrieval so bare metal works
MoralCode ade7bab
unused os import
MoralCode b3b4642
updated metadata
sgoggins 513c021
Update copyright year in README.md
sgoggins 54e869a
fix: filter NULL comment URLs in github message task to prevent crash
guptapratykshh 99b14e4
refactor: reduce scope to URL abstraction only
SuyashJain17 349bd0b
fix: add pylint disable for bare-except to pass CI
SuyashJain17 2a94523
fix: resolve lint errors and undefined variables
SuyashJain17 8269ee9
Merge branch 'main' into feat/github-enterprise-api-support
SuyashJain17 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
im not sure this is the good long-term solution we are hoping for.
Whille this issue is specifically about githubs url, we also have our sights set on adding more platforms, and using the config in this way will require code changes for every url that is added - i.e. if someone wants to add a self hosted Forgejo instance).
Ultimately, we want to be able to dynamically find API keys for a particular platform and domain
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think this PR acts as necessary stepping stone, by refactoring these hardcoded strings now, we isolate "Base URL" dependency into single utility function
github_api_url.pyThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this PR begins to address, and may sufficiently for a proof of concept, fully address multitenancy, which is a long ambition of Augur. Handling Enterprise GitHub is a pretty huge step forward.
One question: @SuyashJain17 : Do we have an enterprise GitHub we can test this against, because I do not have such access.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don’t currently have access to a live GitHub Enterprise instance.
This was implemented against GitHub’s documented Enterprise API behavior (including /api/v3 and /graphql), and the change is fully opt-in.
If there’s an internal Enterprise test environment available, I’m happy to validate or adjust based on real responses.