Received incorrect resource to customized plugin ruby file
Overview
We are using Gitlab Triage bot
to automate some actions.
One of them is to create an issue for each stale branch.
Process
For this we are iterating each branch through triage bot.
if it is a stale branch, fetching project_path from webUrl of resource
and creating issue using restApi.
For api call we are using customized plugin.
Here resource
is the payload provided by triage bot to customized plugin.
Issue
We had received same branch_webUrl
for different projects which made issues create in incorrect projects.
We are fetching project_path from webUrl provided by resource payload.
Here webUrl is url of the branch.
Output Screenshots
For Project with id 1123,
when we fetch project path from provided webUrl we got tec/pantry/birdseye/components/ev-schedule-add-a-vehicle
.
The project path which is encoded is highlighted in below screenshot.
For Project with id 1176,
when we fetch project path from provided webUrl we got tec/pantry/birdseye/components/ev-schedule-add-a-vehicle
The project path which is encoded is highlighted in below screenshot.