rodrigoluizs opened a new issue, #8195:
URL: https://github.com/apache/incubator-devlake/issues/8195

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/incubator-devlake/issues?q=is%3Aissue) and 
found no similar feature requirement.
   
   
   ### Use case
   
   As an engineer, I want to integrate DevLake’s webhook API into my company’s 
internal infrastructure without the need to manage and persist webhook IDs 
(connectionId). Instead, I would like to use webhook names, which are easier to 
derive and manage in our systems, for actions such as creating deployments, 
managing issues, or retrieving webhook details.
   
   This will allow me to streamline the integration process, reduce complexity, 
and avoid maintaining additional components solely for mapping webhook IDs to 
projects.
   
   ### Description
   
   While integrating DevLake into our internal infrastructure, we encountered a 
limitation with the current Webhook API. The existing endpoints require the 
webhook connection ID (connectionId) to perform actions like creating 
deployments or managing issues. This presents a challenge, as webhook IDs are 
not easy to derive/template, requiring additional components to persist and map 
these IDs to projects, which complicates integration.
   
   ### Endpoints:
   
   ```
   POST    /plugins/webhook/connections/:connectionId/deployments
   POST    /plugins/webhook/:connectionId/issue/:issueKey/close
   POST    /plugins/webhook/:connectionId/issues
   DELETE  /plugins/webhook/connections/{connectionId}
   GET     /plugins/webhook/connections/{connectionId}
   PATCH   /plugins/webhook/connections/{connectionId}
   ```
   ### Proposed Enhancement
   
   To make integration easier, I propose either extending these endpoints or 
creating new ones to accept webhook names as an alternative to connectionId. 
For example:
   
   - Current: POST /plugins/webhook/connections/:connectionId/deployments
   - Proposed: POST /plugins/webhook/connections/:connectionName/deployments
   
   ### Benefits
   
   - Improved Usability: Webhook names are straightforward to derive, 
eliminating the need to maintain a mapping between webhook IDs and projects.
   - Simplified Integration: Reduces the development effort by removing the 
requirement for additional components to manage the relationship between 
projects and their webhooks.
   
   ### Request for Feedback
   
   If I missed an existing approach to achieve this, I’d appreciate your 
guidance. I’m new to the project but eager to learn, and if this makes sense 
for the project, I’d be happy to contribute to its implementation. 
   
   Looking forward to your feedback!
   
   ### Related issues
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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: [email protected]

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

Reply via email to