Skip to content

Commit 4ddc3c0

Browse files
authored
feat: support working-directory input (#63)
* Add optional working directory input * Add some logging * Commit build * Added more logging * Build * More logging * Try something else * Test * No max buffer size * Tidy * Format * Alter tests to mock error logging * Try this
1 parent 7dfa12c commit 4ddc3c0

File tree

6 files changed

+225
-129
lines changed

6 files changed

+225
-129
lines changed

README.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,19 @@ jobs:
3737
3838
## Inputs
3939
40-
| Name | Description | Required | Default |
41-
|------|-------------|----------|---------|
42-
| `base-ref` | Base ref to compare against (defaults to main or PR target) | No | Auto-detected from PR or `main` |
43-
| `github-token` | The GitHub token for authentication | Yes | `${{ github.token }}` |
44-
| `pr-number` | The number of the pull request to comment on | Yes | `${{ github.event.pull_request.number }}` |
45-
| `dependency-threshold` | Threshold for warning about significant increase in number of dependencies | No | `10` |
46-
| `size-threshold` | Threshold (in bytes) for warning about significant increase in package size | No | `100000` |
47-
| `duplicate-threshold` | Threshold for warning about packages with multiple versions | No | `1` |
48-
| `base-packages` | Glob pattern for base branch pack files (e.g., `"./base-packs/*.tgz"`) | No | None |
49-
| `source-packages` | Glob pattern for source branch pack files (e.g., `"./source-packs/*.tgz"`) | No | None |
50-
| `pack-size-threshold` | Threshold (in bytes) for warning about significant increase in total pack size | No | `50000` |
51-
| `detect-replacements` | Detect modules which have community suggested alternatives | No | `true` |
40+
| Name | Description | Required | Default |
41+
|------------------------|--------------------------------------------------------------------------------|----------|-------------------------------------------|
42+
| `base-ref` | Base ref to compare against (defaults to main or PR target) | No | Auto-detected from PR or `main` |
43+
| `github-token` | The GitHub token for authentication | Yes | `${{ github.token }}` |
44+
| `pr-number` | The number of the pull request to comment on | Yes | `${{ github.event.pull_request.number }}` |
45+
| `dependency-threshold` | Threshold for warning about significant increase in number of dependencies | No | `10` |
46+
| `size-threshold` | Threshold (in bytes) for warning about significant increase in package size | No | `100000` |
47+
| `duplicate-threshold` | Threshold for warning about packages with multiple versions | No | `1` |
48+
| `base-packages` | Glob pattern for base branch pack files (e.g., `"./base-packs/*.tgz"`) | No | None |
49+
| `source-packages` | Glob pattern for source branch pack files (e.g., `"./source-packs/*.tgz"`) | No | None |
50+
| `pack-size-threshold` | Threshold (in bytes) for warning about significant increase in total pack size | No | `50000` |
51+
| `detect-replacements` | Detect modules which have community suggested alternatives | No | `true` |
52+
| `working-directory` | Working directory to scan for package lock file | No | None |
5253

5354
## Example with custom inputs
5455

action.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ inputs:
4444
description: 'Detect modules which have community suggested alternatives'
4545
required: false
4646
default: true
47+
working-directory:
48+
description: 'Working directory to scan for package lock file'
49+
required: false
4750

4851
runs:
4952
using: node24

0 commit comments

Comments
 (0)