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

[CI] Chore: Only run actions for contributors #5739

Merged

Conversation

gregfromstl
Copy link
Member

@gregfromstl gregfromstl commented Dec 13, 2024

Problem solved

Short description of the bug fixed or feature added


PR-Codex overview

This PR updates GitHub Actions workflows to enhance pull request handling by adding conditions for author associations and expanding the issue types that trigger actions.

Detailed summary

  • In .github/workflows/auto-assign.yml:

    • Added conditions to the assign-author job to check if the author is a MEMBER, OWNER, or COLLABORATOR.
  • In .github/workflows/issue.yml:

    • Expanded the types of pull requests that trigger actions to include ready_for_review.
    • Added logic to automatically pass checks for external contributors.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

linear bot commented Dec 13, 2024

Copy link

changeset-bot bot commented Dec 13, 2024

⚠️ No Changeset found

Latest commit: dc1e07b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Dec 13, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 14, 2024 5:41pm
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 14, 2024 5:41pm
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 14, 2024 5:41pm
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 14, 2024 5:41pm

Copy link

graphite-app bot commented Dec 13, 2024

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge-queue - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

Copy link

codecov bot commented Dec 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 53.01%. Comparing base (2b5080d) to head (dc1e07b).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5739   +/-   ##
=======================================
  Coverage   53.01%   53.01%           
=======================================
  Files        1101     1101           
  Lines       59079    59079           
  Branches     4809     4809           
=======================================
  Hits        31322    31322           
  Misses      27039    27039           
  Partials      718      718           
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from 2b5080d
packages 50.15% <ø> (ø)

*This pull request uses carry forward flags. Click here to find out more.

Copy link
Contributor

github-actions bot commented Dec 13, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 44.94 KB (0%) 899 ms (0%) 3.5 s (+58.64% 🔺) 4.4 s
thirdweb (cjs) 110.78 KB (0%) 2.3 s (0%) 6.1 s (+16.91% 🔺) 8.3 s
thirdweb (minimal + tree-shaking) 5.58 KB (0%) 112 ms (0%) 211 ms (-27.76% 🔽) 323 ms
thirdweb/chains (tree-shaking) 506 B (0%) 10 ms (0%) 55 ms (-18.93% 🔽) 65 ms
thirdweb/react (minimal + tree-shaking) 19.03 KB (0%) 381 ms (0%) 577 ms (+19.44% 🔺) 958 ms

Comment on lines 28 to 29
const { exec } = require('child_process');
exec('npx @toshimaru/auto-author-assign');
Copy link

Choose a reason for hiding this comment

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

Running npx via exec() is error-prone since it won't properly propagate failures to the workflow. A more reliable approach is to use the GitHub Action directly with a conditional:

- uses: toshimaru/[email protected]
  if: ${{ github.event.pull_request.author_association == 'MEMBER' || 
          github.event.pull_request.author_association == 'OWNER' || 
          github.event.pull_request.author_association == 'COLLABORATOR' }}

This ensures proper error handling and maintains the original functionality.

Spotted by Graphite Reviewer

Is this helpful? React 👍 or 👎 to let us know.

@gregfromstl gregfromstl added the merge-queue Adds the pull request to Graphite's merge queue. label Dec 14, 2024
Copy link
Member Author

gregfromstl commented Dec 14, 2024

Merge activity

  • Dec 14, 12:38 PM EST: The merge label 'merge-queue' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Dec 14, 12:38 PM EST: A user added this pull request to the Graphite merge queue.
  • Dec 14, 12:42 PM EST: A user merged this pull request with the Graphite merge queue.

## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR enhances the GitHub workflows for pull requests by adding conditions for author associations and expanding issue types.

### Detailed summary
- In `.github/workflows/auto-assign.yml`, added checks to assign authors only if they are `MEMBER`, `OWNER`, or `COLLABORATOR`.
- In `.github/workflows/issue.yml`, expanded the `types` to include `ready_for_review`.
- Added logic to automatically pass checks for external contributors.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
@gregfromstl gregfromstl force-pushed the greg/cnct-2678-disable-gh-actions-for-external-contributors branch from 04b278c to dc1e07b Compare December 14, 2024 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge-queue Adds the pull request to Graphite's merge queue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants