diff --git a/Dockerfile b/Dockerfile index 423c65e..26f5942 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM launchdarkly/ld-find-code-refs-github-action:2.12.0 +FROM launchdarkly/ld-find-code-refs-github-action:2.13.0 LABEL com.github.actions.name="LaunchDarkly Code References" LABEL com.github.actions.description="Find references to feature flags in your code." diff --git a/README.md b/README.md index 6d05a3c..dbdc7de 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ jobs: with: fetch-depth: 11 # This value must be set if the lookback configuration option is not disabled for find-code-references. Read more: https://github.com/launchdarkly/ld-find-code-refs#searching-for-unused-flags-extinctions - name: LaunchDarkly Code References - uses: launchdarkly/find-code-references@v2.12.0 + uses: launchdarkly/find-code-references@v2.13.0 with: accessToken: ${{ secrets.LD_ACCESS_TOKEN }} projKey: LD_PROJECT_KEY @@ -71,7 +71,7 @@ jobs: with: fetch-depth: 11 # This value must be set if the lookback configuration option is not disabled for find-code-references. Read more: https://github.com/launchdarkly/ld-find-code-refs#searching-for-unused-flags-extinctions - name: LaunchDarkly Code References - uses: launchdarkly/find-code-references@v2.12.0 + uses: launchdarkly/find-code-references@v2.13.0 with: accessToken: ${{ secrets.LD_ACCESS_TOKEN }} projKey: LD_PROJECT_KEY @@ -83,19 +83,20 @@ Once your workflow has been created, the best way to confirm that the workflow i If the action fails, there may be a problem with your configuration. To investigate, dig into the action's logs to view any error messages. - + ## Inputs -| parameter | description | required | default | +| name | description | required | default | | --- | --- | --- | --- | -| accessToken | A token with write access to the LaunchDarkly project. | `true` | | -| allowTags | Enable storing references for tags. Lists the tag as a branch. | `false` | false | -| baseUri | The base URL of the LaunchDarkly server for this configuration. | `false` | https://app.launchdarkly.com | -| contextLines | The number of context lines above and below a code reference for the job to send to LaunchDarkly. By default, the flag finder will not send any context lines to LaunchDarkly. If < 0, it will send no source code to LaunchDarkly. If 0, it will send only the lines containing flag references. If > 0, it will send that number of context lines above and below the flag reference. You may provide a maximum of 5 context lines. | `false` | 2 | -| debug | Enable verbose debug logging. | `false` | false | -| ignoreServiceErrors | If enabled, the scanner will terminate with exit code 0 when the LaunchDarkly API is unreachable or returns an unexpected response. | `false` | false | -| lookback | Set the number of commits to search in history for whether you removed a feature flag from code. You may set to 0 to disable this feature. Setting this option to a high value will increase search time. | `false` | 10 | -| projKey | Key of the LaunchDarkly project associated with this repository. Found under Account Settings -> Projects in the LaunchDarkly dashboard. Cannot be combined with `projects` block in configuration file. | `false` | | -| repoName | The repository name. Defaults to the current GitHub repository. | `false` | | -| prune | There is a known issue where the GitHub Action will not prune deleted branch data in private repos. Only enable this if you are running the action in a public repo. | `false` | false | - +| `accessToken` |
A token with write access to the LaunchDarkly project.
| `true` | `""` | +| `allowTags` |Enable storing references for tags. Lists the tag as a branch.
| `false` | `false` | +| `baseUri` |The base URL of the LaunchDarkly server for this configuration.
| `false` | `https://app.launchdarkly.com` | +| `contextLines` |The number of context lines above and below a code reference for the job to send to LaunchDarkly. By default, the flag finder will not send any context lines to LaunchDarkly. If < 0, it will send no source code to LaunchDarkly. If 0, it will send only the lines containing flag references. If > 0, it will send that number of context lines above and below the flag reference. You may provide a maximum of 5 context lines.
| `false` | `2` | +| `debug` |Enable verbose debug logging.
| `false` | `false` | +| `ignoreServiceErrors` |If enabled, the scanner will terminate with exit code 0 when the LaunchDarkly API is unreachable or returns an unexpected response.
| `false` | `false` | +| `lookback` |Set the number of commits to search in history for whether you removed a feature flag from code. You may set to 0 to disable this feature. Setting this option to a high value will increase search time.
| `false` | `10` | +| `projKey` |Key of the LaunchDarkly project associated with this repository. Found under Account Settings -> Projects in the LaunchDarkly dashboard. Cannot be combined with projects
block in configuration file.
The repository name. Defaults to the current GitHub repository.
| `false` | `""` | +| `prune` |There is a known issue where the GitHub Action will not prune deleted branch data in private repos. Only enable this if you are running the action in a public repo.
| `false` | `false` | +| `subdirectory` |The subdirectory to run the action in.
| `false` | `""` | + diff --git a/action.yml b/action.yml index f061d4e..265c6a4 100644 --- a/action.yml +++ b/action.yml @@ -42,6 +42,9 @@ inputs: default: "false" description: "There is a known issue where the GitHub Action will not prune deleted branch data in private repos. Only enable this if you are running the action in a public repo." required: false + subdirectory: + description: "The subdirectory to run the action in." + required: false runs: using: 'docker' image: 'Dockerfile' @@ -56,3 +59,4 @@ runs: LD_IGNORE_SERVICE_ERRORS: ${{ inputs.ignoreServiceErrors }} LD_LOOKBACK: ${{ inputs.lookback }} LD_PRUNE: ${{ inputs.prune }} + LD_SUBDIRECTORY: ${{ inputs.subdirectory }}