Skip to content

Conversation

@tuxmainy
Copy link
Contributor

@tuxmainy tuxmainy commented Dec 4, 2025

Hi,
this fixes an "internal error" when trying to delete a repository in woodpecker which is already deleted on github.

Other forges might also be affected but I think it has to be fixed in every forge implementation itself because every forge will response differently.

see issue #5140

regards
Daniel

@qwerty287 qwerty287 added bug Something isn't working server labels Dec 5, 2025
@qwerty287
Copy link
Contributor

Thanks!

For consistency reasons, it would be nice to have this for all forges and not just github. Can you try to check it out as fas as possible? If not, we can also take a look of course. But I'd rather not merge this with only fixing the issue for github.

@tuxmainy
Copy link
Contributor Author

tuxmainy commented Dec 5, 2025

For consistency reasons, it would be nice to have this for all forges and not just github. Can you try to check it out as fas as possible? If not, we can also take a look of course. But I'd rather not merge this with only fixing the issue for github.

Yeah, that would be nice. But I wonder how to do this? Every forge might have another response if the repo is already deleted. Also the error interface only has a String, thus you cannot detect specific error for all repos.

Any thoughts?

@tuxmainy tuxmainy closed this Dec 5, 2025
@tuxmainy tuxmainy reopened this Dec 5, 2025
@tuxmainy

This comment was marked as outdated.

@qwerty287
Copy link
Contributor

No, I'd go with the approach you used already, for github: error handling inside the forge. But this needs to be added to the other forges as well. As you said a general solution won't work.

@tuxmainy
Copy link
Contributor Author

tuxmainy commented Dec 6, 2025

No, I'd go with the approach you used already, for github: error handling inside the forge. But this needs to be added to the other forges as well. As you said a general solution won't work.

I have added the same logic to gitea. But I fear I am done here. I don't have the possibility to test other forges as well and I don't like to commit code which I haven't tested before :(

@lafriks
Copy link
Contributor

lafriks commented Dec 7, 2025

Would be better to use short variable names, like errr, ok := ... ( ok is common use case to check cast result etc)

1 similar comment
@lafriks
Copy link
Contributor

lafriks commented Dec 7, 2025

Would be better to use short variable names, like errr, ok := ... ( ok is common use case to check cast result etc)

@tuxmainy
Copy link
Contributor Author

tuxmainy commented Dec 7, 2025

Would be better to use short variable names, like errr, ok := ... ( ok is common use case to check cast result etc)

Thanks, also make test should work now. Please keep an eye on my changes as I am not familiar with golang.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working server

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants