Closed mattbishop closed 5 years ago
Thank you, setting "autoCreateIssue" to false stopped the auto login issue.
Now, however, it cannot create an issue with a comment if the issue does not exist already. In "postComment", there is a test for issue
having a value, and when I debug I see that issue = null
:
if (!this.API || !this.issue || this.isLoadingComments)
Not undefined, but null.
Not undefined, but null.
What's wrong with this?
Just clarifying that it is null instead of undefined.
The full method in Chrome is:
async postComment({content: e}) {
try {
if (!this.API || !this.issue || this.isCreatingComment)
return;
return this.isCreatingComment = !0,
await this.API.postComment({accessToken:this.accessToken,content:e,issueId:this.issue.id})
} catch (e) {
throw this.$emit("error", e),
e
} finally {
this.isCreatingComment = !1
}
}
Sorry I cannot find it in your source code. I'm guessing webpack magic is making it hard to find. :)
So I need to figure out why issue
is null. My options look like this (I left out github props):
options: {
perPage: 20,
autoCreateIssue: false,
prefix: '[Comment]',
labels: ['comment'],
...
So I am using default title and a specific label. I have created the label in my repo's issues.
You can check these methods if you want to figure out why the issue is not found
And this tip may help
I think the problem is when autoCreateIssue=false
AND no matching issue exists in GitHub, Vssue will not POST a new issue when the user clicks "submit comment". I am expecting "submit comment" to POST to create the issue.
I have 0 issues: https://github.com/Level3-REST/site/issues
I am expecting "submit comment" to POST to create the issue.
It's not so reasonable. We should not allow all users to create an issue for your page. In addition, the other users cannot access labels in your repository.
That's why we use labels to help identify the issue, or other people can create a fake issue to hack your page.
I see your reasoning, yet I'd be OK to accept that any logged-in github user could create a new issue for my page. They can already to that in the "issues" tab for my project so I don't see a difference.
Ideally labels could be templatized like title to help with finding them. like, 'comment: ${url}'
They can create a new issue, but they cannot set the labels.
We can keep discussion if you have any ideas. Close this issue as the original problem is fixed.
Thanks for being so responsive! Vssues is a great project.
Describe the bug
The "in-browser" Getting Started section here: https://vssue.js.org/guide/getting-started.html#in-browser
I've chosen:
<script>
render function for vue runtime buildExpected behavior
I would expect the client would have to log into github only when they want to, not automatically.
Environment (please complete the following information):
Additional context
I have left this running at http://level3.rest