From 08d560f0079d7d413035a1e04024ceb6b0e23533 Mon Sep 17 00:00:00 2001 From: Inglonias <2125926+Inglonias@users.noreply.github.com> Date: Mon, 20 Dec 2021 19:29:04 -0500 Subject: [PATCH] Removed GitHub PAT code from Catapult --- scripts/ChangelogDialod.gd | 5 +---- scripts/SettingsUI.gd | 5 ----- scripts/settings_manager.gd | 1 - 3 files changed, 1 insertion(+), 10 deletions(-) diff --git a/scripts/ChangelogDialod.gd b/scripts/ChangelogDialod.gd index d74b60f7..7afc7761 100644 --- a/scripts/ChangelogDialod.gd +++ b/scripts/ChangelogDialod.gd @@ -28,9 +28,6 @@ func download_pull_requests(): var url = _PR_URL[_settings.read("game")] url += "+is%3Apr+is%3Amerged&per_page=" + prs var headers = ["user-agent: CatapultGodotApp"] - var pat = _settings.read("github_pat") - if (pat.length() == 40): - headers.push_back("Authorization: token " + pat) _pr_data = "Fetching recent changes from GitHub. Please wait..." _pullRequests.request(url, headers) _changelogTextBox.clear() @@ -46,7 +43,7 @@ func _on_PullRequests_request_completed(result, response_code, headers, body): _pr_data += "\n\nHTTP response code: " + str(response_code) if (json) and ("message" in json): _pr_data += "\nGitHub says: [i]%s[/i]" % json["message"] - _pr_data += "\n\nSometimes, requests will fail repeatedly due to excessive load on the server, especially for DDA. This may depend on the time of day, your location, etc. There's little anyone can do about this. If you are registered on GitHub, you can add your [url=https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token]PAT (Personal Access Token)[/url] to Catapult config file to increase the priority of your requests or bypass rate limits." + _pr_data += "\n\nPlease try again later." else: _pr_data = process_pr_data(json) _changelogTextBox.clear() diff --git a/scripts/SettingsUI.gd b/scripts/SettingsUI.gd index 7ed3f0cb..2e4e5b27 100644 --- a/scripts/SettingsUI.gd +++ b/scripts/SettingsUI.gd @@ -121,8 +121,3 @@ func _on_any_migration_checkbox_toggled(_asdf: bool) -> void: data_types.append(type) _settings.store("game_data_to_migrate", data_types) - - -func _on_lePATUse_text_changed(new_text): - if (new_text.length() == 40 or new_text.length() == 0): - _settings.store("github_pat", new_text) diff --git a/scripts/settings_manager.gd b/scripts/settings_manager.gd index fed4a64a..dc7be3c6 100644 --- a/scripts/settings_manager.gd +++ b/scripts/settings_manager.gd @@ -14,7 +14,6 @@ const _HARDCODED_DEFAULTS = { "shorten_release_names": false, "num_releases_to_request": 10, "num_prs_to_request": 50, - "github_pat": "", "ui_scale_override": 1.0, "ui_scale_override_enabled": false, "show_stock_mods": false,