Skip to content

Gitpod badge is not displayed when PR doesn't have description #7488

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

Closed
shaal opened this issue Jan 6, 2022 · 5 comments
Closed

Gitpod badge is not displayed when PR doesn't have description #7488

shaal opened this issue Jan 6, 2022 · 5 comments
Labels
component: server meta: stale This issue/PR is stale and will be closed soon size/S team: webapp Issue belongs to the WebApp team type: bug Something isn't working

Comments

@shaal
Copy link
Contributor

shaal commented Jan 6, 2022

Bug description

After adding addBadge: true to .gitpod.yml

github:
  prebuilds:
    # add a "Open in Gitpod" button to the pull request's description (defaults to false)
    addBadge: true

When creating a new PR with no description, a Gitpod badge is not added to PR description.

Steps to reproduce

Make sure your repo has this code in .gitpod.yml -

github:
  prebuilds:
    # add a "Open in Gitpod" button to the pull request's description (defaults to false)
    addBadge: true

Create a new PR, make sure to only give a title to the PR, but no descirption.
Confirm that the PR has no Gitpod badge in its description.

Workspace affected

No response

Expected behavior

When addBadge: true is added to .gitpod.yml, I expect the Gitpod badge to be displayed in all PRs, including PRs without a descirption.

Example repository

https://github.com/shaal/gitpod-test--no-gitpod-badge-in-pr-without-description

I created 2 PRs -

Anything else?

No response

@gtsiolis
Copy link
Contributor

Thanks for the detailed write up, @shaal! I remember seeing a similar report from @JanKoehnlein in #3812.

This is also something to consider introducing as a preference in project settings, see #7426.

@NotNoah
Copy link

NotNoah commented Jun 2, 2022

Any word on if this can be fixed? We quite often have Pull Requests with no description as all the info is usually in our PR titles

@RCheesley
Copy link

We also have this happening in multiple repos for mautic!

@Siddhant-K-code
Copy link
Member

Siddhant-K-code commented Oct 1, 2022

Maybe Following will fix this

const body: string | null = pr.body;

- const body: string | null = pr.body;
+ const body: string = pr.body | ""; 

@stale
Copy link

stale bot commented Jan 2, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the meta: stale This issue/PR is stale and will be closed soon label Jan 2, 2023
@stale stale bot closed this as completed Jun 12, 2023
@github-project-automation github-project-automation bot moved this to In Validation in 🍎 WebApp Team Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: server meta: stale This issue/PR is stale and will be closed soon size/S team: webapp Issue belongs to the WebApp team type: bug Something isn't working
Projects
Status: In Validation
Development

No branches or pull requests

8 participants