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

chore: Convert preview to use labels #851

Merged
merged 1 commit into from Aug 14, 2020

Conversation

@nschonni
Copy link
Member

nschonni commented Aug 13, 2020

Description

Related Issues

@MylesBorins
Copy link
Member

MylesBorins commented Aug 13, 2020

perhaps we should add this as an additional action (not replacing the existing one). That way we can land and test without interrupting existing workflows. We'll likely have to land and iterate to make sure there are no kinks

@nschonni nschonni force-pushed the nschonni:preview-with-labels branch 3 times, most recently from c8d0301 to e996387 Aug 13, 2020
@nschonni
Copy link
Member Author

nschonni commented Aug 13, 2020

OK, I duplicated the job and dropped the template changes for now

@nschonni nschonni requested a review from mmarchini Aug 13, 2020
@mmarchini
Copy link
Member

mmarchini commented Aug 13, 2020

The event needs to be pull_request_target because pull_request won't have access to secrets in PRs coming from forks.

@nschonni
Copy link
Member Author

nschonni commented Aug 13, 2020

@nschonni nschonni force-pushed the nschonni:preview-with-labels branch from e996387 to 360ae90 Aug 13, 2020
@nschonni nschonni requested a review from MylesBorins Aug 13, 2020
@nschonni
Copy link
Member Author

nschonni commented Aug 13, 2020

@mmarchini I'm guessing the repo settings from https://github.blog/2020-08-03-github-actions-improvements-for-fork-and-pull-request-workflows/ will need to be enabled as well?

@mmarchini
Copy link
Member

mmarchini commented Aug 14, 2020

Shouldn't be, those settings are specific for Private repositories

.github/workflows/start-ci.yml Show resolved Hide resolved
${{ runner.os }}-node-
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true' && steps.comment.outputs.result == 'true'

This comment has been minimized.

Copy link
@mmarchini

mmarchini Aug 14, 2020

Member

shouldn't npm ci always run, regardless of cache existing or not?

This comment has been minimized.

Copy link
@nschonni

nschonni Aug 14, 2020

Author Member

The cache key is based on the lock file, so if there are no changes to that, the ci call isn't needed. Although that's not the case for any repos that have install hooks for building.
I know this is broken for the issue version of this https://github.com/nodejs/nodejs.dev/runs/981741342?check_suite_focus=true#step:21:2 and could probably be removed

This comment has been minimized.

Copy link
@nschonni

nschonni Aug 14, 2020

Author Member

Decided just to drop both conditions, since I don't think it's going to affect speed much. I'll see if this gives a similar error after landing

@nschonni nschonni force-pushed the nschonni:preview-with-labels branch from 360ae90 to b493c2c Aug 14, 2020
@nschonni nschonni force-pushed the nschonni:preview-with-labels branch from b493c2c to 903f1a8 Aug 14, 2020
@nschonni nschonni merged commit 3460b97 into nodejs:master Aug 14, 2020
2 checks passed
2 checks passed
test-ci
Details
test-ci
Details
@nschonni nschonni deleted the nschonni:preview-with-labels branch Aug 14, 2020
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.issues.createComment({
issue_number: context.pull_request.number,

This comment has been minimized.

Copy link
@nschonni

nschonni Aug 14, 2020

Author Member

OK, it looks like it doesn't like this :(

This comment has been minimized.

Copy link
@mmarchini

mmarchini Aug 14, 2020

Member

Assuming context is equal to the Action variable github.event, you can try context.number.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.