Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gitpod's GitHub Integration feature "addComment" no longer works #3235

Closed
jankeromnes opened this issue Feb 19, 2021 · 8 comments · Fixed by #4029
Closed

Gitpod's GitHub Integration feature "addComment" no longer works #3235

jankeromnes opened this issue Feb 19, 2021 · 8 comments · Fixed by #4029
Assignees
Labels
feature: prebuilds git provider: github priority: 💪 stretch goal This issue is a stretch goal within an iteration. type: bug Something isn't working type: feature request New feature or request

Comments

@jankeromnes
Copy link
Contributor

jankeromnes commented Feb 19, 2021

Describe the bug

When you configure your .gitpod.yml with:

github:
  prebuilds:
    addComment: true

the added comment should have a "Open/Review in Gitpod" button. But right now, it seems to have a broken image instead:

Screenshot 2021-02-18 at 20 37 54

A few examples out in the wild:

This might have pushed projects to disable this feature: forem/forem@4b5622f

Steps to reproduce

  1. Open a Pull Request against any project using addComment: true e.g. https://github.com/gitpod-io/workspace-images

Expected behavior

  • The button image should work

Additional information

The automated comment's HTML body seems to be generated here:

const body = `\n\n<a href="${this.env.hostUrl.withContext(contextURL)}"><img src="${newBadge}" /></a>\n\n`;

Maybe it's getBadgeImageURL that no longer works properly:

protected getBadgeImageURL(cloneURL: string, commit: string): string {
if (cloneURL.startsWith("https://")) {
cloneURL = cloneURL.substring("https://".length);
}
const name = `${cloneURL}/${commit}.svg`;
return this.env.hostUrl.withApi({ pathname: `/apps/github/pbs/${name}` }).toString();
}

Example repository

https://github.com/gitpod-io/workspace-images/

@jankeromnes jankeromnes changed the title Gitpod GitHub Integration feature "addComment" no longer works Gitpod's GitHub Integration feature "addComment" no longer works Feb 19, 2021
@jankeromnes jankeromnes added this to the March 2021 milestone Feb 19, 2021
@csweichel
Copy link
Contributor

We should rather remove this functionality. It comes from a time when we didn't know how this feature should work. Closed in favour of #3303

@jankeromnes
Copy link
Contributor Author

Re-opening this -- I think it would be cool to just fix the images while deprecation work is ongoing.

(No need for significant engineering work -- just serving some SVG should be fine).

@jankeromnes jankeromnes reopened this Apr 15, 2021
@jankeromnes jankeromnes added the type: feature request New feature or request label Apr 15, 2021
@jankeromnes jankeromnes modified the milestones: [backlog] March 2021, April 2021 Apr 15, 2021
@jankeromnes jankeromnes added the priority: 💪 stretch goal This issue is a stretch goal within an iteration. label Apr 15, 2021
@jankeromnes jankeromnes self-assigned this Apr 15, 2021
@raisedadead
Copy link

Hi @jankeromnes

Please ignore if this is not valid.

I renabled the GitPod commenting on our repo and we got this comment a little while ago: https://github.com/freeCodeCamp/freeCodeCamp/pull/41824#issuecomment-825041202

image

I am assuming this most likely because the fix hasn't hit production? I just wanted to give you some early feedback just in case.

Cheers.

@jankeromnes
Copy link
Contributor Author

Hi @raisedadead! Indeed, the fix hasn't made it to production yet. That's expected to happen some time next week.

Sorry for the confusion here -- we used to leave fixed issues open, with a fixed-not-deployed label, until the fix made it to production. We should probably do something similar again.

@raisedadead
Copy link

That makes sense. Please do not worry about it. I am just a fan who gets excited about this. Cheers.

@jankeromnes
Copy link
Contributor Author

jankeromnes commented Apr 22, 2021

@raisedadead Thanks for the enthusiasm!

FYI, the new button comment currently looks like this: jankeromnes/gitpod-staging-prebuilds#5 (comment) 😁 (additionally, the currently broken images should also get automatically fixed with a redirect next week).

@jankeromnes
Copy link
Contributor Author

@raisedadead FYI, addComment (and addBadge) work again! See for example gitpod-io/workspace-images#393

This relatively small fix makes me really happy 😍

@raisedadead
Copy link

Thanks @jankeromnes I just checked it on some of our PRs and even older comments have been fixed. Thanks a lot for fixing this.

Cheers 🍻 🎉 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: prebuilds git provider: github priority: 💪 stretch goal This issue is a stretch goal within an iteration. type: bug Something isn't working type: feature request New feature or request
Projects
None yet
3 participants