-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
chore: add custom comment with link to playground for pkg.pr.new
#14151
Conversation
|
preview: https://svelte-dev-git-preview-svelte-14151-svelte.vercel.app/ this is an automated message |
|
|
tweaked the comment but I believe there were some unresolved questions around using |
Yeah we should check what happens on forks or follow @pngwn suggestion of using two workflows. Will check in a bit |
Mmm i don't think we can try what happens...i will implement @pngwn solution just to be safe |
Mmm apparently https://github.com/orgs/community/discussions/25288 What should we do? Merge and eventually fix? |
I think this will fail. It is referencing a context value that doesn’t exist in this event type. |
Which context doesn't exist here? I saved, sha, and issue number on the output itself... isn't context.repo.owner still available? |
It failed, but for a different reason: https://github.com/sveltejs/svelte/actions/runs/11684845805 |
|
||
if (output.event_name === 'pull_request') { | ||
if (context.issue.number) { | ||
await create_or_update_comment(context.issue.number); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@paoloricciuti This
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually it will never even run looking at this. None of these events types match.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The event name is on the output not on the context...but yeah this I missed it...will fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I see. Makes sense.
I would check that the artifact is in the right place. Or where we are reading it from is correct. Helpful to ls files when working with artifacts. |
Yeah that's the problem probably...if I push code that changes the workflow in a new PR will it run in the context of the pr? |
Not on the workflow run workflow but you could check the location on the pr workflow after creating the artifact. That might offer some insight. |
I would leave off the path tbh. The default should be fine. Then I think the existing code might work. It could be that it is outputting to |
…14151) * chore: add custom comment with link to playground for `pkg.pr.new` * chore: small updates to the script output * chore: refine comment a bit, include multiple packages * tweak comment * chore: two steps workflow * chore: update workflow --------- Co-authored-by: Rich Harris <[email protected]>
After we merge sveltejs/svelte.dev#745 it could be cool to have the link to the playground directly in the comment.
This is following pkg.pr.new recommendation to add a custom comment with some modification on my part to make it more useful for us. I'm not entirely sure what would happen on merge but i guess we can always iterate.
Before submitting the PR, please make sure you do the following
feat:
,fix:
,chore:
, ordocs:
.Tests and linting
pnpm test
and lint the project withpnpm lint