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

skip_completing ignores true value and completes #43

Closed
walkerk1980 opened this issue Oct 9, 2024 · 0 comments
Closed

skip_completing ignores true value and completes #43

walkerk1980 opened this issue Oct 9, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@walkerk1980
Copy link
Contributor

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.

@walkerk1980 walkerk1980 added the bug Something isn't working label Oct 9, 2024
walkerk1980 added a commit to walkerk1980/command that referenced this issue Oct 9, 2024
GrantBirki added a commit that referenced this issue Oct 14, 2024
#43 skip_completing ignores true value and completes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant