Skip to content

Unpublish#1371

Closed
Ryang-21 wants to merge 2 commits into
masterfrom
unpublish
Closed

Unpublish#1371
Ryang-21 wants to merge 2 commits into
masterfrom
unpublish

Conversation

@Ryang-21
Copy link
Copy Markdown
Contributor

@Ryang-21 Ryang-21 commented Apr 1, 2026

No description provided.

Copilot AI review requested due to automatic review settings April 1, 2026 21:55
@github-project-automation github-project-automation Bot moved this to Backlog (Not Ready) in DevX Apr 1, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a GitHub Actions workflow intended to unpublish @stellar/stellar-sdk@15.0.0 from npm.

Changes:

  • Introduces a new .github/workflows/unpublish.yml workflow.
  • Configures Node.js 20 + upgrades npm, then runs npm unpublish for a specific package/version.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +3 to +5
on:
pull_request:

Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

Running an npm unpublish workflow on every pull_request event is high-risk: if this lands on the default branch it will attempt to unpublish the package whenever any PR is opened/updated. This should be a manually-invoked workflow (e.g., workflow_dispatch) with explicit inputs (package/version) and (optionally) an environment requiring approvals.

Copilot uses AI. Check for mistakes.
Comment on lines +4 to +12
pull_request:

permissions:
id-token: write
contents: read

jobs:
unpublish:
runs-on: ubuntu-latest
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

Granting id-token: write to a PR-triggered workflow is unsafe (OIDC tokens can be requested by code in the workflow run). Apply least privilege by removing this permission for PR events, or move the workflow to workflow_dispatch + protected environment and only grant id-token: write at the job level when needed.

Suggested change
pull_request:
permissions:
id-token: write
contents: read
jobs:
unpublish:
runs-on: ubuntu-latest
workflow_dispatch:
jobs:
unpublish:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,24 @@
name: Unpublish v15.0.0
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

The workflow hard-codes the version (both in the workflow name and the unpublish command). This makes reuse/error-prone updates likely; prefer workflow_dispatch inputs (or env vars) for package name and version so the same workflow can be safely reused without code changes.

Copilot uses AI. Check for mistakes.
Comment on lines +23 to +24
- name: Unpublish @stellar/stellar-sdk@15.0.0
run: npm unpublish @stellar/stellar-sdk@15.0.0 --provenance
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

The unpublish target is hard-coded and there is no guardrail (confirmation, allowlist, or restricted branch/ref) to prevent unpublishing the wrong package/version. Consider adding validation (e.g., only allow a specific scoped package, require explicit input match, and/or restrict execution to the default branch under a protected environment).

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 1, 2026

Size Change: 0 B

Total Size: 45.4 MB

ℹ️ View Unchanged
Filename Size
dist/stellar-sdk-minimal.js 6 MB
dist/stellar-sdk-minimal.min.js 5.11 MB
dist/stellar-sdk-no-axios.js 6 MB
dist/stellar-sdk-no-axios.min.js 5.11 MB
dist/stellar-sdk-no-eventsource.js 6.27 MB
dist/stellar-sdk-no-eventsource.min.js 5.33 MB
dist/stellar-sdk.js 6.27 MB
dist/stellar-sdk.min.js 5.33 MB

compressed-size-action

@Ryang-21 Ryang-21 closed this Apr 1, 2026
@github-project-automation github-project-automation Bot moved this from Backlog (Not Ready) to Done in DevX Apr 1, 2026
@Ryang-21 Ryang-21 deleted the unpublish branch April 1, 2026 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants