tscircuit / core

8 stars 16 forks source link

CI: Failing bundle-size reporter workflow #320

Open DhairyaMajmudar opened 3 hours ago

DhairyaMajmudar commented 3 hours ago

-> It has been noticed that whenever a new PR is opened by non-tscircuit org. member bundle-size reporter workflow fails to do possible permission issue

-> Error logs:-

/home/runner/work/_actions/marocchino/sticky-pull-request-comment/v2/node_modules/@actions/core/lib/core.js:106
        throw new Error(`Input required and not supplied: ${name}`);
^
Error: Input required and not supplied: GITHUB_TOKEN
    at Object.getInput (/home/runner/work/_actions/marocchino/sticky-pull-request-comment/v2/node_modules/@actions/core/lib/core.js:106:1)
    at Object.88 (/home/runner/work/_actions/marocchino/sticky-pull-request-comment/v2/lib/config.js:67:1)
    at __nccwpck_require__ (/home/runner/work/_actions/marocchino/sticky-pull-request-comment/v2/webpack/bootstrap:21:1)
    at Object.3109 (/home/runner/work/_actions/marocchino/sticky-pull-request-comment/v2/lib/main.js:37:1)
    at __nccwpck_require__ (/home/runner/work/_actions/marocchino/sticky-pull-request-comment/v2/webpack/bootstrap:21:1)
    at /home/runner/work/_actions/marocchino/sticky-pull-request-comment/v2/webpack/startup:4:1
    at Object.<anonymous> (/home/runner/work/_actions/marocchino/sticky-pull-request-comment/v2/dist/index.js:32978:12)
    at Module._compile (node:internal/modules/cjs/loader:1358:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
    at Module.load (node:internal/modules/cjs/loader:1208:32)

-> Possible Fix:-

Errors are coming from Update comment step https://github.com/tscircuit/core/blob/main/.github/workflows/bundle-size.yml#L86-L106, This step can be by passed

seveibar commented 2 hours ago

/bounty $10

algora-pbc[bot] commented 2 hours ago

💎 $10 bounty • tscircuit

Steps to solve:

  1. Start working: Comment /attempt #320 with your implementation plan
  2. Submit work: Create a pull request including /claim #320 in the PR body to claim the bounty
  3. Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts

Thank you for contributing to tscircuit/core!

Add a bountyShare on socials

Attempt Started (GMT+0) Solution
🟢 @AkashJana18 Nov 17, 2024, 8:27:26 PM WIP
AkashJana18 commented 2 hours ago

/attempt #320

  1. Ensure GITHUB_TOKEN is passed to the sticky-pull-request-comment action in bundle-size.yml.
  2. Define necessary permissions (e.g., pull-requests: write, issues: write) in the workflow file.
  3. Optionally, add a conditional check to skip the "Update comment" step for non-members.
  4. Test the workflow with a PR from a non-member to confirm the fix works.