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

include instructions for reporting problems in the pr-preview comment #107

Open
equalsJeffH opened this issue Feb 10, 2022 · 1 comment
Open

Comments

@equalsJeffH
Copy link

presently comment in the pr-preview block (i.e., the comment + the links inserted into a github PR's original post) does not include instructions for how to report issues with pr-preview.

Perhaps something like this would work:

<!--
    This comment and the below content is programmatically generated.
    You may add a comma-separated list of anchors you'd like a
    direct link to below (e.g. #idl-serializers, #idl-sequence):

    Don't remove this comment or modify anything below this line.
    If you don't want a preview generated for this pull request,
    just replace the whole of this comment's content by "no preview"
    and remove what's below.
                                                             // new
    Please report problems by submitting an issue at:        // new
    https://github.com/tobie/pr-preview/                     // new
-->

...?

@tobie
Copy link
Owner

tobie commented Feb 11, 2022

That sounds like a good idea.

Here are the files that would need to be updated:

  1. https://github.com/tobie/pr-preview/blob/master/lib/views/base.js
  2. https://github.com/tobie/pr-preview/blob/master/test/models/pr.js
  3. https://github.com/tobie/pr-preview/blob/master/test/fixtures/pr2.json
  4. https://github.com/tobie/pr-preview/blob/master/test/fixtures/pr.json

A fix for this would need to stay compatible with pre-existing pull requests and tests should test both scenarios. I think that in practice this is actually easier than it sounds, as the logic relies on the INTRO part of the comment to remove an existing comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants