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 #6362

Merged
merged 12 commits into from
Oct 1, 2024
Merged

chore: add pkg.pr.new #6362

merged 12 commits into from
Oct 1, 2024

Conversation

userquin
Copy link
Member

@userquin userquin commented Aug 19, 2024

Description

This PR includes:

  • update PR template to include /publish tip
  • add CR comment workflow via /publish (tip on the PR template)
  • add CR workflow to use cr-tracked label PR or main branch push
  • release all packages: we can add one workflow per package releasing only the corresponding one

This PR requires:

This PR requires also a review to exclude CR for docs for example, we can use something like this in on.pull_request:

    paths-ignore:
      - '.github/**'
      - 'test/**'
      - 'examples/**'      
      - 'docs/**'
      - '*.md'

/cc @Aslemammad

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. If the feature is substantial or introduces breaking changes without a discussion, PR might be closed.
  • Ideally, include a test that fails without this PR but passes with it.
  • Please, don't make changes to pnpm-lock.yaml unless you introduce a new test example.

Tests

  • Run the tests with pnpm test:ci.

Documentation

  • If you introduce new functionality, document it. You can run documentation with pnpm run docs command.

Changesets

  • Changes in changelog are generated from PR name. Please, make sure that it explains your changes in an understandable manner. Please, prefix changeset messages with feat:, fix:, perf:, docs:, or chore:.

Copy link

netlify bot commented Aug 19, 2024

Deploy Preview for vitest-dev ready!

Name Link
🔨 Latest commit 094916a
🔍 Latest deploy log https://app.netlify.com/sites/vitest-dev/deploys/66fb3863210ac1000801e7bd
😎 Deploy Preview https://deploy-preview-6362--vitest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@userquin userquin changed the title chore: add pkg-pr-new chore: add pkg.pr.new Aug 19, 2024
runs-on: ubuntu-latest

steps:
- run: gh issue edit ${{ github.event.issue.number }} --add-label cr-tracked --repo ${{ github.repository }}
Copy link
Member

Choose a reason for hiding this comment

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

hmm, what is this for?

Copy link
Member Author

@userquin userquin Aug 19, 2024

Choose a reason for hiding this comment

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

will add the cr-tracked label once received /publish PR comment, check vite-pwa/vite-plugin-pwa#742

Copy link
Member

Choose a reason for hiding this comment

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

ohhh, makes sense! Thank you so much!

@Aslemammad
Copy link
Member

I love this.

@hi-ogawa hi-ogawa added the p2-to-be-discussed Enhancement under consideration (priority) label Sep 26, 2024
@sheremet-va sheremet-va removed the p2-to-be-discussed Enhancement under consideration (priority) label Sep 26, 2024
@hi-ogawa
Copy link
Contributor

@userquin We discussed about how to trigger pkg.pr.new and we agreed "cr-tracked" label based workflow is okay. I'll push a few commits here and see how it goes.

@hi-ogawa
Copy link
Contributor

@sheremet-va We haven't installed the app yet? https://github.com/vitest-dev/vitest/actions/runs/11050071341/job/30697038656?pr=6362#step:7:13

{"url":"/check","statusCode":404,"statusMessage":"Not Found","message":"The app https://github.com/apps/pkg-pr-new is not installed on vitest-dev/vitest."}

@sheremet-va
Copy link
Member

@sheremet-va We haven't installed the app yet? vitest-dev/vitest/actions/runs/11050071341/job/30697038656?pr=6362#step:7:13

{"url":"/check","statusCode":404,"statusMessage":"Not Found","message":"The app https://github.com/apps/pkg-pr-new is not installed on vitest-dev/vitest."}

We didn't install anything

@sheremet-va
Copy link
Member

Should be installed now

@userquin
Copy link
Member Author

you need to add the app to vitest repo: https://github.com/stackblitz-labs/pkg.pr.new?tab=readme-ov-file#setup

Copy link

pkg-pr-new bot commented Sep 26, 2024

@vitest/coverage-istanbul

pnpm add https://pkg.pr.new/@vitest/coverage-istanbul@6362

@vitest/browser

pnpm add https://pkg.pr.new/@vitest/browser@6362

@vitest/coverage-v8

pnpm add https://pkg.pr.new/@vitest/coverage-v8@6362

@vitest/expect

pnpm add https://pkg.pr.new/@vitest/expect@6362

@vitest/pretty-format

pnpm add https://pkg.pr.new/@vitest/pretty-format@6362

@vitest/mocker

pnpm add https://pkg.pr.new/@vitest/mocker@6362

@vitest/spy

pnpm add https://pkg.pr.new/@vitest/spy@6362

@vitest/snapshot

pnpm add https://pkg.pr.new/@vitest/snapshot@6362

@vitest/runner

pnpm add https://pkg.pr.new/@vitest/runner@6362

@vitest/utils

pnpm add https://pkg.pr.new/@vitest/utils@6362

@vitest/ui

pnpm add https://pkg.pr.new/@vitest/ui@6362

vite-node

pnpm add https://pkg.pr.new/vite-node@6362

@vitest/web-worker

pnpm add https://pkg.pr.new/@vitest/web-worker@6362

@vitest/ws-client

pnpm add https://pkg.pr.new/@vitest/ws-client@6362

vitest

pnpm add https://pkg.pr.new/vitest@6362

commit: 094916a

@userquin
Copy link
Member Author

@userquin We discussed about how to trigger pkg.pr.new and we agreed "cr-tracked" label based workflow is okay. I'll push a few commits here and see how it goes.

Check vitepress repo, using vue bot, check cr.yml and cr-comment.yml here: https://github.com/vuejs/vitepress/tree/main/.github/workflows

@hi-ogawa
Copy link
Contributor

@userquin cr-comment.yml doesn't look necessary since we can just add label manually when we want to allow PRs to be released. Isn't it only doing /publish comment to trigger adding label cr-tracked indirectly?

@userquin
Copy link
Member Author

userquin commented Sep 26, 2024

@hi-ogawa I've sent you an invitation to vue discord server and a link to Vitepress room/channel, I asked brc_dd and his answer was:

Actually, github actions can also add labels but labels added via their default bot cannot trigger other actions. 🫠 That's why add it using separate user.

@sheremet-va
Copy link
Member

Actually, github actions can also add labels but labels added via their default bot cannot trigger other actions. 🫠 That's why add it using separate user.

We don't want to add labels automatically. The idea is that the maintainer adds a label to allow CR manually

@hi-ogawa
Copy link
Contributor

Yeah, I just also checked re-labeling "cr-tracked" and this alone can also trigger CR correctly. https://github.com/vitest-dev/vitest/actions/workflows/cr.yml

image

@hi-ogawa
Copy link
Contributor

I tested a few examples locally and also on stackblitz and it looks working https://stackblitz.com/edit/vitest-dev-vitest-ei9jaw?file=package.json
I think we can proceed with this PR.

@patak-dev
Copy link
Member

For reference, adding the label automatically refers to this scheme:

I think adding a label instead of a comment is quite nice too, so good to move forward with this PR as is. I think in Vite we'll keep the comment (with the label workaround). We can try both approaches and see what ends up working best.

Copy link
Member

@sheremet-va sheremet-va left a comment

Choose a reason for hiding this comment

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

Do we need a mention in the readme/documentation that we have this? We have this for example: https://vitest.dev/guide/#using-unreleased-commits

@userquin
Copy link
Member Author

Do we need a mention in the readme/documentation that we have this? We have this for example: https://vitest.dev/guide/#using-unreleased-commits

https://github.com/vite-pwa/vite-plugin-pwa/blob/main/.github/pull_request_template.md

@sheremet-va
Copy link
Member

sheremet-va commented Sep 30, 2024

Do we need a mention in the readme/documentation that we have this? We have this for example: vitest.dev/guide#using-unreleased-commits

vite-pwa/vite-plugin-pwa@main/.github/pull_request_template.md

The comment can only be added by the maintainers

We also publish every commit on main

@hi-ogawa
Copy link
Contributor

hi-ogawa commented Oct 1, 2024

I just pushed a few commits but pkg-pr-new publish is getting stuck today.
@Aslemammad Could it be some infra issue? Would be great to know if there's something we can do to diagnose issue.

EDIT: Oh, it got OOM https://github.com/vitest-dev/vitest/actions/runs/11115894967/job/30885165567#step:7:22

@Aslemammad
Copy link
Member

interesting, can you trigger a re-run for the failed workflow?

@hi-ogawa
Copy link
Contributor

hi-ogawa commented Oct 1, 2024

Thanks for the help. I started a re-run and it looks like it's still stuck.

@Aslemammad
Copy link
Member

That's bad, I'll just have a look soon!

@Aslemammad
Copy link
Member

Aslemammad commented Oct 1, 2024

I think it is fixed now, feel free to trigger a re-run!

@hi-ogawa
Copy link
Contributor

hi-ogawa commented Oct 1, 2024

@Aslemammad
Copy link
Member

Happy to hear that ❤️

@sheremet-va sheremet-va merged commit 9edfa19 into main Oct 1, 2024
9 checks passed
@sheremet-va sheremet-va deleted the userquin/chore-add-pkg-pr-new branch October 1, 2024 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

6 participants