bitrise-steplib / steps-gitlab-status

MIT License
4 stars 15 forks source link

Subgroups are not handled #19

Closed abarisain closed 4 years ago

abarisain commented 4 years ago

Hi,

Our org switched to subgroups, and this step doesn't support them.

This regexp is the culprit: https://github.com/bitrise-steplib/steps-gitlab-status/blob/master/main.go#L30-L36

Our URL look like this:

https://gitlab.foobar.com/group/subgroup/repo.git , and the resulting status URL is https://gitlab.foobar.com/api/v4/projects/subgroup%2Frepo/statuses/<hash>

I'm not sure what's the best way to handle this. I would not mind an environment variable that doesn't attempt to parse an url, but simply expects "group/subgroup/repo" to be well formed.

palcalde commented 4 years ago

Hi, we have the same problem, we are experiencing this error

image

Error: server error: 404 Not Found url: https://gitlab.otters.xyz/api/v4/projects/apps%2Fios/statuses/47dca99839a08f33c1aad37e9114426ca992364d code: 404 body: {"message":"404 Project Not Found"}

As you can see the URL does not contain the project ID but instead the group/subgroup of the gitlab path.

This worked well until 2 weeks ago, I think is this change what broke it: https://github.com/bitrise-steplib/steps-gitlab-status/commit/222f187ee5a12b3523709a9e92bc2d0fcaf4896d

palcalde commented 4 years ago

@trapacska could you give us some help here? it seems you recently changed that method.

palcalde commented 4 years ago

@abarisain I was able to make it work again with version 9

abarisain commented 4 years ago

thanks!

garciadiegosebastian commented 4 years ago

@trapacska Please, could you help us with this?

mackoj commented 4 years ago

I have this issue too I add some test to prove it https://github.com/bitrise-steplib/steps-gitlab-status/pull/21

usmonster commented 4 years ago

I believe I've fixed it in #22. Trying to get the attention of a maintainer.

pigeondev2 commented 4 years ago

We have a ticket for this and will follow-up as soon as it has been fixed. Thank you.

usmonster commented 4 years ago

Hi @non-binary! Do you refer to an internal ticket? Can you please check out the fix I've already provided in #22 and comment if you see anything missing? I believe the fastest path to fixing it would be to merge and release the changes in that PR. Thanks!

pigeondev2 commented 4 years ago

@usmonster Yes, I mean an internal ticket. I am support so I don't have decision power of using that pull request or not but I will send it over to the engineering team to review.

usmonster commented 4 years ago

Thank you! I'm happy as long as someone can look at it. :)