From ed02969bf62b8072bdc9c51fe48c9b8b7b1268c5 Mon Sep 17 00:00:00 2001 From: Theo Ephraim Date: Thu, 1 Aug 2024 21:33:17 -0700 Subject: [PATCH] just checking if pr.pkg.new is working --- .changeset/six-hotels-clean.md | 5 +++++ .../{external-pr-labeler.yaml => pr-labeler.yaml} | 13 +++++++------ .github/workflows/release-preview.yaml | 7 +++++++ packages/integrations/remix/src/index.ts | 2 ++ 4 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 .changeset/six-hotels-clean.md rename .github/workflows/{external-pr-labeler.yaml => pr-labeler.yaml} (69%) diff --git a/.changeset/six-hotels-clean.md b/.changeset/six-hotels-clean.md new file mode 100644 index 00000000..0e641d6d --- /dev/null +++ b/.changeset/six-hotels-clean.md @@ -0,0 +1,5 @@ +--- +"@dmno/remix-integration": patch +--- + +update remix integration' diff --git a/.github/workflows/external-pr-labeler.yaml b/.github/workflows/pr-labeler.yaml similarity index 69% rename from .github/workflows/external-pr-labeler.yaml rename to .github/workflows/pr-labeler.yaml index ae417d66..ddee556a 100644 --- a/.github/workflows/external-pr-labeler.yaml +++ b/.github/workflows/pr-labeler.yaml @@ -16,17 +16,18 @@ jobs: issues: write pull-requests: write env: - DMNO_STAFF: "theoephraim philmillman" + # pre-approved maintainers list (dmno staff) + MAINTAINERS_LIST: "theoephraim philmillman" steps: - name: Check PR author id: check_author run: | PR_AUTHOR="${{ github.event.pull_request.user.login }}" - if ! [[ "${DMNO_STAFF}" =~ "$PR_AUTHOR" ]]; then - echo "Authored by DMNO community member!" - echo "requires-community-tag=true" >> $GITHUB_OUTPUT + if [[ "${MAINTAINERS_LIST}" =~ "$PR_AUTHOR" ]]; then + echo "Authored by pre-approved maintainer" + echo "official-maintainer=true" >> $GITHUB_OUTPUT else - echo "Authored by DMNO staff" + echo "Authored by DMNO community member!" fi - name: Label PR uses: actions/github-script@v5 @@ -36,5 +37,5 @@ jobs: owner: context.repo.owner, repo: context.repo.repo, issue_number: ${{ github.event.pull_request.number }}, - labels: [ steps.check_author.outputs.requires-community-tag && 'community' && 'staff' ] + labels: [ {{ steps.check_author.outputs.official-maintainer && 'maintainer' || 'community' }} ] }); diff --git a/.github/workflows/release-preview.yaml b/.github/workflows/release-preview.yaml index 5cd6856f..92d9fe17 100644 --- a/.github/workflows/release-preview.yaml +++ b/.github/workflows/release-preview.yaml @@ -7,6 +7,10 @@ jobs: steps: - uses: actions/checkout@v4 + with: + # by default only the current commit is fetched + # but we need more history to be able to compare to main + fetch-depth: 0 - name: Enable Corepack run: corepack enable - name: Use Node.js 20.x @@ -20,6 +24,9 @@ jobs: - name: Build publishable DMNO modules run: pnpm build:libs + - run: git diff --name-only origin/main HEAD + - run: git rev-parse --abbrev-ref HEAD + # we use a custom script to run `npx pkg-pr-new publish` # so that we can determine which packages to release - name: Release preview pacakges diff --git a/packages/integrations/remix/src/index.ts b/packages/integrations/remix/src/index.ts index 3d70d4c8..02f83edd 100644 --- a/packages/integrations/remix/src/index.ts +++ b/packages/integrations/remix/src/index.ts @@ -80,6 +80,8 @@ export function dmnoRemixVitePlugin(dmnoOptions?: DmnoPluginOptions) { // this function will get called on each restart! async config(config, env) { + console.log('testing pr.pkg.new!'); + // console.log('vite config hook', config, env); // remix loads 2 vite servers, one for frontend, one for back // this feels hacky to identify it but seems to be working ok