Code links missing relative paths in template?
Hi, we're VERY happy uses of this bot -- it's AMAZING!
I noticed in a recent PR that the link to code is not quite right.
https://github.com/publiclab/plots2/issues/2398
See app/models/node.rb links to https://github.com/publiclab/plots2/blob/master/node.rb in the Step By Step item.
It's supposed to link to: https://github.com/publiclab/plots2/blob/master/app/models/node.rb
Do we have this set up wrong?
[$FILENAME]($BRANCH_URL) is in our config file: https://github.com/publiclab/plots2/blob/master/.github/first-timers-issue-template.md
What variables are allowed in there? And I can't seem to find the example file anymore, has this changed?
Thanks so much!!!
These are the placeholders we got so far:
https://github.com/hoodiehq/first-timers-bot/blob/8d327baf23ac89962566e6bdf6e52a1b4e1c55f3/lib/create-issue.js#L5-L9
I guess $FILENAME should contain the whole path, not only the file name, I guess that is the problem.
Do you want to take a stab and try to send a pull request to fix it? It's odd because I thought the filename would already contain the whole path. This is the REST API endpoint we are using: https://developer.github.com/v3/repos/commits/#get-a-single-commit
hmm, indeed filename does return the whole path; see this example:
https://api.github.com/repos/publiclab/plots2/commits/40f6b3f12c55b99b2346f2a4da36d2835bb88b9d
What could be happening here?
On Mon, Feb 26, 2018 at 3:20 PM, Gregor Martynus [email protected] wrote:
These are the placeholders we got so far:
https://github.com/hoodiehq/first-timers-bot/blob/ 8d327baf23ac89962566e6bdf6e52a1b4e1c55f3/lib/create-issue.js#L5-L9
I guess $FILENAME should contain the whole path, not only the file name, I guess that is the problem.
Do you want to take a stab and try to send a pull request to fix it? It's odd because I thought the filename would already contain the whole path. This is the REST API endpoint we are using: https://developer.github.com/v3/repos/commits/#get-a-single-commit
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/hoodiehq/first-timers-bot/issues/189#issuecomment-368636569, or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJwg0pyQMw6dCjUEw2T2sYf4iUVwzks5tYxIJgaJpZM4STiSs .
This commit dates from Oct 11 2017... could this be related?
https://github.com/hoodiehq/first-timers-bot/commit/ccddf306db1df8c2dc4a6dc2c4bc8f531a333934#diff-5386adb7a1fcd68387c4b69ec28eb4b0R14
I think i have this, working on regex now... :-)
Yes - opening PR now:
"https://github.com/publiclab/plots2/blob/master/app/models/node.rb".replace(/(?:blob\/)(\w+)/g, "blob/my-branch")
Test and fix in different commits in #192.