GitHub user klesh added a comment to the discussion: Multiple projects, same 
webhook integration

Ah, I see.  

The key point is: *“We have a 1-1 relationship between the repository and the 
deployment project”*.  
That means you can use the **deployment project name** as a variable instead of 
hardcoding constants for each project.  

Here’s an idea:  

1. Define a new route in the `webhook` plugin, e.g. 
`/projects/:projectName/deployments`.  
2. Implement a new `ApiResourceHandler` (based on the existing 
`PostDeploymentCicdTask`) that will:  
   - Create the missing `webhook connection` for the given project  
   - Then call `PostDeploymentCicdTask` to finish the rest of the workflow.  

This way, we minimize effort while keeping compatibility.  

*PS: Am I correct in assuming that putting the `projectName` in the request URL 
is just as straightforward as putting it in the body?*  


GitHub link: 
https://github.com/apache/incubator-devlake/discussions/6348#discussioncomment-14205824

----
This is an automatically sent email for dev@devlake.apache.org.
To unsubscribe, please send an email to: dev-unsubscr...@devlake.apache.org

Reply via email to