eladkal commented on a change in pull request #16003:
URL: https://github.com/apache/airflow/pull/16003#discussion_r650539412



##########
File path: airflow/providers/discord/hooks/discord_webhook.py
##########
@@ -101,7 +101,7 @@ def _get_webhook_endpoint(self, http_conn_id: 
Optional[str], webhook_endpoint: O
                 'Expected Discord webhook endpoint in the form of 
"webhooks/{webhook.id}/{webhook.token}".'
             )
 
-        return endpoint
+        return f'https://discord.com/api/{endpoint}'

Review comment:
       In the operator we have instructions how to set both `http_con_id` & 
`webhook_endpoint` :
   
   
https://github.com/apache/airflow/blob/001dc22af9a30f710501eac85ff04297ba2a728f/airflow/providers/discord/operators/discord_webhook.py#L36-L41
   
   Is this issue of insufficient documentation about how to set the connection 
or do we have a bug that either way it does not work?

##########
File path: airflow/providers/discord/hooks/discord_webhook.py
##########
@@ -101,7 +101,7 @@ def _get_webhook_endpoint(self, http_conn_id: 
Optional[str], webhook_endpoint: O
                 'Expected Discord webhook endpoint in the form of 
"webhooks/{webhook.id}/{webhook.token}".'
             )
 
-        return endpoint
+        return f'https://discord.com/api/{endpoint}'

Review comment:
       In the operator we have instructions how to set both `http_con_id` & 
`webhook_endpoint` :
   
   
https://github.com/apache/airflow/blob/001dc22af9a30f710501eac85ff04297ba2a728f/airflow/providers/discord/operators/discord_webhook.py#L36-L42
   
   Is this issue of insufficient documentation about how to set the connection 
or do we have a bug that either way it does not work?

##########
File path: airflow/providers/discord/hooks/discord_webhook.py
##########
@@ -101,7 +101,7 @@ def _get_webhook_endpoint(self, http_conn_id: 
Optional[str], webhook_endpoint: O
                 'Expected Discord webhook endpoint in the form of 
"webhooks/{webhook.id}/{webhook.token}".'
             )
 
-        return endpoint
+        return f'https://discord.com/api/{endpoint}'

Review comment:
       In the operator we have instructions how to set both `http_conn_id` & 
`webhook_endpoint` :
   
   
https://github.com/apache/airflow/blob/001dc22af9a30f710501eac85ff04297ba2a728f/airflow/providers/discord/operators/discord_webhook.py#L36-L42
   
   Is this issue of insufficient documentation about how to set the connection 
or do we have a bug that either way it does not work?




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to