镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Add a label to note “this is good for CI” #62496

Description

@mcollina

Currently, only approved PRs can trigger CI. However, this is unpractical because I often LGTM things to see what’s the state in CI (sorry, I’m lazy).

Is it possible to improve our automation to know on which commit the request-ci label was applied to, and if this was applied by a collaborator, trust it?

Activity

  1. jasnell commented on Mar 29, 2026

    @jasnell
    Member

    For this I would usually just launch the ci job manually.

  2. panva commented on Mar 29, 2026

    @panva
    Member

    If you can be bothered to do this from a console

    request-ci () {
    	if [ $# -eq 0 ]
    	then
    		echo "Usage: request-ci <PR_NUMBER>"
    		echo "Example: request-ci 123"
    		return 1
    	fi
    	local pr_number=$1 
    	echo "Getting last commit SHA for PR #${pr_number}..."
    	local last_commit_sha=$(gh pr view $pr_number --json commits --jq '.commits[-1].oid') 
    	if [ -z "$last_commit_sha" ]
    	then
    		echo "Error: Could not retrieve commit SHA for PR #${pr_number}"
    		return 1
    	fi
    	echo "Last commit SHA: $last_commit_sha"
    	echo "About to run: ncu-ci run $pr_number --certify-safe $last_commit_sha"
    	echo -n "Do you want to proceed? (y/N): "
    	read -r confirmation
    	if [[ "$confirmation" =~ ^[Yy]$ ]]
    	then
    		echo "Running CI..."
    		ncu-ci run $pr_number --certify-safe $last_commit_sha
    	else
    		echo "CI request cancelled."
    		return 0
    	fi
    }
  3. joyeecheung commented on Mar 30, 2026

    @joyeecheung
    Member

    I think I suggested somewhere in https://github.com/nodejs/node-core-utils/issues that we could just allow it in the CI if the commit to test was pushed by a collaborator. In any case the logic needs to happen in there..

  4. aduh95 commented on Mar 30, 2026

    @aduh95
    Contributor

    To start a CI from the CLI, ncu-ci run <url-of-the-commit-to-test> does the job, e.g. ncu-ci run https://github.com/nodejs/node/pull/62379/commits/ccc837f89e282530e44348d5e6ec3f32058fcd44

  5. aduh95 commented on Mar 30, 2026

    @aduh95
    Contributor

    Is it possible to improve our automation to know on which commit the request-ci label was applied to

    No it's not possible, GH API does not give us that information.

    In nodejs/node-core-utils#920, I have worked on making it work by parsing comments (so if a collaborator comments @nodejs-github-bot test ccc837f89e282530e44348d5e6ec3f32058fcd44, the CI would know to trust that commit), but it's actually more work for the collaborator than using the CLI, and using GH comments is not very elegant (sends notifications to everyone subscribed, can be edited, no auto-complete so easy to mess up syntax, etc)

  6. aduh95 commented on Mar 31, 2026

    @aduh95
    Contributor

    I've opened #62524 which should already improve the UX

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions