CircleCI-Public / orb-tools-orb

Various tools for authoring and publishing CircleCI orbs
https://circleci.com/orbs/registry/orb/circleci/orb-tools
MIT License
51 stars 74 forks source link

feat: Add a source-dir parameter to orb-tools/review #159

Closed surecloud-meason closed 1 year ago

surecloud-meason commented 2 years ago

Describe Request:

Currently when using a monorepo structure its not possible to use orb-tools/review out of the box as you can't specify a directory to grab the src files from. Please can we implement this for orb-tools/review similar to how its been implemented in orb-tools/pack.

Current issue:

setup() {
 REVIEW_TEST_DIR="./"
 IFS="," read -ra SKIPPED_REVIEW_CHECKS \<<<"${PARAM_RC_EXCLUDE}"
}

Fix could be as simple as adding the below:

parameters:
    source-dir:
        default: ./src/
        description: Path to the orb source. Path must be absolute or relative to the working directory.
        type: string

environment:
    REVIEW_TEST_DIR: << parameters.output-dir >>

setup() {
 IFS="," read -ra SKIPPED_REVIEW_CHECKS \<<<"${PARAM_RC_EXCLUDE}"
}

Examples:

Problem happens when your orbs are not at the root directory of your git project.

KyleTryon commented 1 year ago

Now available in https://github.com/CircleCI-Public/orb-tools-orb/releases/tag/v11.3.0