canonical / ght

Perform actions in Greenhouse from you terminal
9 stars 14 forks source link

The reset option does not use the right URL #186

Open camille-rodriguez opened 1 year ago

camille-rodriguez commented 1 year ago

I expected ght reset to delete current job posts of a given role. What happens: camille@camille-ubuntu:~$ ght reset 1458920 ✔ Using the saved credentials. ✔ Setup is completed. ✖ Job cannot be found in https://canonical.greenhouse.io/jobapps/1458920/edit.

Indeed, https://canonical.greenhouse.io/jobapps/1458920/edit does not exist. My job posts are listed at this URL : https://canonical.greenhouse.io/plans/1458920/jobapp

When using ghtctl --delete-posts, it goes to the correct place. Which brings a side question - isn't ghtctl the published snap of ght ? If not, which one should we be using ? Is one abandoned?

anthonydillon commented 1 year ago

@Dampolo03 @muhammadbassiony @andesol could you take a look at this one please?

camille-rodriguez commented 1 year ago

I did more digging in the code and I found that the previous tool, ghtctl, requested to use the jobapp # from the global job view , for example https://canonical.greenhouse.io/plans/1458920/jobapp/ in my case. The new tool is requesting the job ID from the Canonical job board, which means we need to open up one specific job post in edit mode and grab the ID from that URL (i.e https://canonical.greenhouse.io/jobapps/3850893/edit) and then the ght snap accepts to run fully.

I'm fine either way, now that I'm able to make this work, but ideally the README should explicitly say where/how to grab the job ID.