Skip to content

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

Closed
@jankeromnes

Description

@jankeromnes

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/

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions