Skip to content

chore: add Action for generating diff tour links - #2

Open
buenos-nachos wants to merge 5 commits into
mainfrom
tour-action
Open

chore: add Action for generating diff tour links#2
buenos-nachos wants to merge 5 commits into
mainfrom
tour-action

Conversation

@buenos-nachos

@buenos-nachos buenos-nachos commented Sep 9, 2026

Copy link
Copy Markdown

Changelog

  • Added a general org-scoped version of the Diff Tour generation Action from sourcegraph/sourcegraph
  • Cleaned up the code for the script so that it follows the recommended practices from actions/github-script more closely
  • Added a few files (Biome, etc.) to make sure the new JavaScript doesn't get janky or hit code quality concerns over time

@buenos-nachos buenos-nachos self-assigned this Sep 9, 2026
@buenos-nachos

buenos-nachos commented Sep 9, 2026

Copy link
Copy Markdown
Author

@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

@buenos-nachos
buenos-nachos added this pull request to stack #4 September 9, 2026 21:44
Comment thread diff-tour/action.yaml
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
script: |
const script = require(`${{ github.action_path }}/generateTourLink.cjs`)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

an explicit file would be fine yeah!

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool. Just ripped out the other stuff

@marcleblanc2
marcleblanc2 requested review from marcleblanc2 and removed request for marcleblanc2 September 10, 2026 21:52
@marcleblanc2

Copy link
Copy Markdown

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.

@marcleblanc2

Copy link
Copy Markdown

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.
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

Successfully merging this pull request may close these issues.

3 participants