Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix(github): say which value is missing when no access token is set (#99005)

Tom Owers8e0d03b7a144
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/github/source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/github/source.py
index 864484651d8a..dc82087d970d 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/github/source.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/github/source.py
@@ -351,7 +351,7 @@ If automatic creation failed with a permissions error, the fix depends on how yo
# Deterministic credential/config errors from _get_access_token and OAuthMixin.
# These never resolve on retry — the source needs reconfiguring or reconnecting.
"Missing GitHub integration ID": "No GitHub account is connected. Connect a GitHub account and try again.",
- "Missing personal access token": "GitHub personal access token is not configured. Please update the source configuration.",
+ "Missing personal access token": "No GitHub personal access token is set. Enter one, or switch the authentication type to OAuth and connect a GitHub account.",
"No repositories configured": "No repositories are selected for this source. Please update the source configuration.",
"resolve to the same warehouse table": "Two selected repositories resolve to the same warehouse table. Please remove or rename one.",
"Too many repositories configured": "Too many repositories are selected for this source. Please reduce the list and try again.",
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/github/tests/test_github_source_class.py b/products/warehouse_sources/backend/temporal/data_imports/sources/github/tests/test_github_source_class.py
index e2e5224c00cc..3f180adf502f 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/github/tests/test_github_source_class.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/github/tests/test_github_source_class.py
@@ -494,7 +494,10 @@ class TestGithubSource:
"selection,expected_message",
[
("oauth", "No GitHub account is connected. Connect a GitHub account and try again."),
- ("pat", "GitHub personal access token is not configured. Please update the source configuration."),
+ (
+ "pat",
+ "No GitHub personal access token is set. Enter one, or switch the authentication type to OAuth and connect a GitHub account.",
+ ),
],
)
def test_validate_credentials_maps_config_errors_to_friendly_message(self, selection, expected_message):