8000 chore: skip website tests on PRs from forks by kachick · Pull Request #7296 · typescript-eslint/typescript-eslint · GitHub
[go: up one dir, main page]

Skip to content

chore: skip website tests on PRs from forks #7296

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

Closed
wants to merge 2 commits into from
Closed

chore: skip website tests on PRs from forks #7296

wants to merge 2 commits into from

Conversation

kachick
Copy link
Contributor
@kachick kachick commented Jul 22, 2023

PR Checklist

Overview

  • This change does not block PRs in a fork to same fork.

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @kachick!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!


🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint.

@netlify
Copy link
netlify bot commented Jul 22, 2023

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit a0fadde
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/64bbf89d1b65600008732a08
😎 Deploy Preview https://deploy-preview-7296--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@nx-cloud
Copy link
nx-cloud bot commented Jul 22, 2023

☁️ Nx Cloud Report

CI is running/has finished running commands for commit a0fadde. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 35 targets

Sent with 💌 from NxCloud.

Comment on lines +228 to +229
# The NETLIFY_TOKEN secret will not be available on PRs from forks
if: (github.event_name == 'push' && github.ref_name == 'main') || (github.event.pull_request.head.repo.full_name == github.repository)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This change does not block PRs in a fork to the same fork.
If we really need to skip all PRs in forks, this may be following

Suggested change
# The NETLIFY_TOKEN secret will not be available on PRs from forks
if: (github.event_name == 'push' && github.ref_name == 'main') || (github.event.pull_request.head.repo.full_name == github.repository)
# The NETLIFY_TOKEN secret will not be available on forks
if: (github.event_name == 'push' && github.ref_name == 'main') || (github.event.pull_request.head.repo.full_name == 'typescript-eslint/typescript-eslint')

@kachick kachick marked this pull request as ready for review July 22, 2023 16:00
# The NETLIFY_TOKEN secret will not be available on forks
if: github.repository_owner == 'typescript-eslint'
# The NETLIFY_TOKEN secret will not be available on PRs from forks
if: (github.event_name == 'push' && github.ref_name == 'main') || (github.event.pull_request.head.repo.full_name == github.repository)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have a question, merge_group should trigger this test? Then it may be following

Suggested change
if: (github.event_name == 'push' && github.ref_name == 'main') || (github.event.pull_request.head.repo.full_name == github.repository)
if: contains(fromJSON('["push", "merge_group"]'), github.event_name) || (github.event.pull_request.head.repo.full_name == github.repository)

Copy link
Member

Choose a reason for hiding this comment

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

TIL: https://github.blog/changelog/2022-08-18-merge-group-webhook-event-and-github-actions-workflow-trigger

We don't use merge queues. I don't think test triggers need to account for them.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for sharing the direction! I just had confused with the trigger in here 🙇‍♂️

@JoshuaKGoldberg
Copy link
Member

cc @rubiesonthesky from #7247 with a different approach

@kachick
Copy link
Contributor Author
kachick commented Jul 26, 2023

Thank you, #7247 seems to be aiming for a more polite way, so I close this PR.

@kachick kachick closed this Jul 26, 2023
@kachick kachick deleted the skip-website-tests-on-prs-from-forks branch July 26, 2023 13:26
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Repo: CI / Website tests (pull_request) fails on PRs from forks
2 participants
0