Skip to content
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 pkg.pr.new workflow #5273

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

cardoso
Copy link
Contributor

@cardoso cardoso commented Mar 7, 2025

Details

Adds a workflow for pkg.pr.new. The link contains additional setup instructions and tweaks.

Here's a preview of it running in my fork (@lwc/playground)

Kinda relates to

I think the pkg.pr.new github app might need to be installed in the repo: https://github.com/stackblitz-labs/pkg.pr.new?tab=readme-ov-file#setup

Does this pull request introduce a breaking change?

  • 😮‍💨 No, it does not introduce a breaking change.

Does this pull request introduce an observable change?

  • 🤞 No, it does not introduce an observable change.

GUS work item

@cardoso cardoso requested a review from a team as a code owner March 7, 2025 16:24
- name: Publish preview
run: npx pkg-pr-new publish './packages/@lwc/*' './packages/lwc' --template './playground'
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does the token require any particular perms?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Seems pretty basic to me. I think it even runs without the token, it just won't provide the comment, and won't update when new commits are pushed.

@@ -0,0 +1,28 @@
name: Publish Any Commit
on:
pull_request:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since we're not going to use the preview for every PR, should we create one for every PR? Or should we use label/comment as a trigger?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I would just run on every PR, it won't run without approval anyway, but it can be narrowed down.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -66,6 +66,7 @@
"lint-staged": "^15.4.3",
"magic-string": "^0.30.17",
"nx": "20.4.4",
"pkg-pr-new": "^0.0.40",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Had to add this if we're using yarn exec instead of dlx:

yarn exec v1.22.22
error Couldn't find the binary pkg-pr-new

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants