You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/07/07 18:54:46 UTC

[GitHub] [airflow] josh-fell commented on a diff in pull request #24903: Add test connection functionality to `GithubHook`

josh-fell commented on code in PR #24903:
URL: https://github.com/apache/airflow/pull/24903#discussion_r916189541


##########
airflow/providers/github/hooks/github.py:
##########
@@ -45,17 +46,20 @@ def __init__(self, github_conn_id: str = default_conn_name, *args, **kwargs) ->
         self.get_conn()
 
     def get_conn(self) -> GithubClient:
-        """
-        Function that initiates a new GitHub connection
-        with token and hostname ( for GitHub Enterprise )
-        """
+        """Function that initiates a new GitHub connection with token and hostname (for GitHub Enterprise)."""
         if self.client is not None:
             return self.client
 
         conn = self.get_connection(self.github_conn_id)
         access_token = conn.password
         host = conn.host
 
+        # Currently the only method of authenticating to GitHub in Airflow is via a token. This is not the

Review Comment:
   Adding this check to align with the [connection documentation](https://airflow.apache.org/docs/apache-airflow-providers-github/stable/connections/github.html#configuring-the-connection) as well.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org