-
Notifications
You must be signed in to change notification settings - Fork 106
Enable ci for external collaborators #325
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
base: main
Are you sure you want to change the base?
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
89ee70c to
d6888f2
Compare
d6888f2 to
ad93a6f
Compare
| github-token: ${{ secrets.GITHUB_TOKEN }} | ||
| result-encoding: string | ||
| script: | | ||
| try { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer we pull these out into script files, like here.
| with: | ||
| github-token: ${{ secrets.GITHUB_TOKEN }} | ||
| script: | | ||
| await github.rest.issues.createComment({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure we need to post a comment on the PR. Maybe just no-op.
| const timestamp = new Date().getTime(); | ||
| const ciBranchName = `ci-test/${prDetails.number}-${timestamp}`; | ||
|
|
||
| // Add remote for the external fork if it's from a fork |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would always be from a fork, no?
| script: | | ||
| const prDetails = ${{ steps.pr-details.outputs.result }}; | ||
| const timestamp = new Date().getTime(); | ||
| const ciBranchName = `ci-test/${prDetails.number}-${timestamp}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
timestamp seems unnecessary. PR numbers are unique.
Unless we are planning on creating a new branch each time this workflow is run, but my thinking was that we'd have a 1:1 relationship, and the test PR would update if the branch already exists and /run-ci is invoked for future updates on a given PR. Maybe this is fine for now as

Add new
/run-cicommand to allow repo admins to trigger a CI run for external collaborator PRsLeaving in draft just so we remove the claude generated md files before actually merging :)