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:53:41 UTC

[GitHub] [airflow] josh-fell opened a new pull request, #24903: Add test connection functionality to `GithubHook`

josh-fell opened a new pull request, #24903:
URL: https://github.com/apache/airflow/pull/24903

   Light refactoring of the UI form and converting unit tests from `unittest` to `pytest` as well.
   
   ---
   **^ Add meaningful description above**
   
   Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
   In case of fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals)) is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in a newsfragment file, named `{pr_number}.significant.rst` or `{issue_number}.significant.rst`, in [newsfragments](https://github.com/apache/airflow/tree/main/newsfragments).
   


-- 
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


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

Posted by GitBox <gi...@apache.org>.
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


[GitHub] [airflow] potiuk merged pull request #24903: Add test connection functionality to `GithubHook`

Posted by GitBox <gi...@apache.org>.
potiuk merged PR #24903:
URL: https://github.com/apache/airflow/pull/24903


-- 
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