Make KvStore.list() method required instead of optional
#97
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Remove npm PR tags | |
| on: | |
| pull_request_target: | |
| types: | |
| - closed | |
| jobs: | |
| remove-pr-tags: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - uses: ./.github/actions/setup-node-and-pnpm | |
| - name: Remove PR tags from npm | |
| # Remove tags in fedify packages if exists | |
| run: | | |
| TAG="pr-${PR_NUMBER}" | |
| npm config set //registry.npmjs.org/:_authToken "$NPM_AUTH_TOKEN" | |
| pnpm list --depth -1 -r --json | jq -r '.[] | select(.name and (.name | startswith("@fedify/")) and (.private | not)) | .name' | while IFS= read -r PKG; do | |
| if npm dist-tag ls "$PKG" | grep -q "^$TAG:" ; then | |
| npm dist-tag rm "$PKG" "$TAG" | |
| echo "Removed $TAG from $PKG" | |
| else | |
| echo "Tag $TAG does not exist on $PKG" | |
| fi | |
| done | |
| env: | |
| NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} | |
| PR_NUMBER: ${{ github.event.pull_request.number }} |