chore: add Action for generating diff tour links - #2
Conversation
|
@burmudar I'm not 100% sure if adding this is a good idea, but I think generating diff tour links is going to be really handy for the updates I'm making to the Chrome Extension repo, and I'd rather get this centralized in one place |
| - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 | ||
| with: | ||
| script: | | ||
| const script = require(`${{ github.action_path }}/generateTourLink.cjs`) |
There was a problem hiding this comment.
I think we should rather just have the contents of this script right here. There is a lot of fluff around this which I don't think we quite need yet.
There was a problem hiding this comment.
Would you be okay with keeping the separate .js file but getting rid of everything else in the project?
I can totally see everything else being too much ceremony when we're only adding a single new action, but I think there's still benefits to having the logic in a separate file, at least for local dev. My worry is that if everything's inlined, we'll basically be recreating the problem with Bash scripts, just in a different language
There was a problem hiding this comment.
an explicit file would be fine yeah!
There was a problem hiding this comment.
Cool. Just ripped out the other stuff
0797370 to
da88b9a
Compare
|
I'm stoked to see this @buenos-nachos, lmk if / how I can help get this out. Are you planning on using ABC to push this out to many repos? DS tells me we have 10 repos with a difftour GH Action already, and almost half of them are ones I've added it to, and there are a handful of other repos I've got in mind. |
|
Hey @buenos-nachos, I just noticed the action isn't triggered for closed PRs, so I'll push a commit to your branch with that fix. |
Without `closed` in the trigger types the action never runs after merge, so the comment keeps pointing at a branch-compare link that dies when the branch is deleted. Port the trigger list and job `if` guard from the original sourcegraph/sourcegraph difftour-link.yml workflow.
Changelog
sourcegraph/sourcegraphactions/github-scriptmore closely