Skip to content

skip_completing ignores true value and completes #43

Closed
@walkerk1980

Description

@walkerk1980

Describe the Issue

skip_completing is being ignored when set to true

Action Configuration

  comment_parser:
    runs-on: ubuntu-latest
    steps:
      - name: Parse Issue Comment for Command
        id: branch_deploy
        if: github.event_name == 'issue_comment'
        uses: github/command@v1.2.1
        with:
          command: ".drift refresh"
          allowed_contexts: "issue"
          reaction: eyes
          permissions: write,admin,maintain
          skip_completing: "true" # we will complete the deployment manually

Relevant Actions Log Output

2024-10-09T16:59:20.5017204Z ##[group]Run github/command@v1.2.1
2024-10-09T16:59:20.5017832Z with:
2024-10-09T16:59:20.5018198Z command: .drift refresh
2024-10-09T16:59:20.5018779Z allowed_contexts: issue
2024-10-09T16:59:20.5019230Z reaction: eyes
2024-10-09T16:59:20.5019626Z permissions: write,admin,maintain
2024-10-09T16:59:20.5020244Z skip_completing: true
2024-10-09T16:59:20.5020940Z github_token: ***
2024-10-09T16:59:20.5021340Z status: success
2024-10-09T16:59:20.5021820Z allow_drafts: false
2024-10-09T16:59:20.5022257Z allow_forks: false
2024-10-09T16:59:20.5022623Z skip_ci: false
2024-10-09T16:59:20.5023467Z skip_reviews: false
2024-10-09T16:59:20.5023939Z param_separator: |
2024-10-09T16:59:20.5024318Z allowlist: false
2024-10-09T16:59:20.5024789Z allowlist_pat: false
2024-10-09T16:59:20.5025217Z env:
2024-10-09T16:59:20.5025551Z STACK_CONFIG_FILE: stack_config.yaml
2024-10-09T16:59:20.5026142Z CHECKOUT_REF: main
2024-10-09T16:59:20.5026557Z ##[endgroup]
2024-10-09T16:59:21.2545858Z ✅ operation requested on an �[35missue
2024-10-09T16:59:21.2548020Z 🚀 �[32msuccess!
2024-10-09T16:59:21.2844780Z Post job cleanup.
2024-10-09T16:59:22.0010498Z Evaluate and set job outputs
2024-10-09T16:59:22.0034672Z Set output 'continue'
2024-10-09T16:59:22.0035753Z Set output 'comment_id'
2024-10-09T16:59:22.0036329Z Set output 'initial_reaction_id'
2024-10-09T16:59:22.0037351Z Cleaning up orphan processes

Extra Information

Looks Like skip_completed is read as a bool, then a comparison is run against a string to determine whether to return, which always evaluates to false.

https://github.com/github/command/blob/a0f8c9c9a16aad0cced91b2b7693de599d4093a3/dist/index.js#L33632

    const skip_completing = core.getBooleanInput('skip_completing')

https://github.com/github/command/blob/a0f8c9c9a16aad0cced91b2b7693de599d4093a3/dist/index.js#L33646-L33650

    if (skip_completing === 'true') {
      core.info('⏩ skip_completing set, exiting')
      return
    }

Should treat as a bool as in branch-deploy action.

https://github.com/github/branch-deploy/blob/368e17cf44738ebe4ee145839973967ceaf4ae44/dist/index.js#L42642-L42648

    // Skip the process of completing a deployment, return
    if (skip_completing) {
      core.info(
        `⏩ ${COLORS.highlight}skip_completing${COLORS.reset} set, exiting`
      )
      return
    }

I will create a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions