Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 9 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,36 @@
# octoherd-script-renovate-library-major-version-driver

<!-- [![@latest](https://img.shields.io/npm/v/@octoherd/script-hello-world.svg)](https://www.npmjs.com/package/@octoherd/script-hello-world) -->

[![Build Status](https://github.com/time-loop/octoherd-script-renovate-library-major-version-driver/workflows/Test/badge.svg)](https://github.com/time-loop/octoherd-script-renovate-library-major-version-driver/actions?query=workflow%3ATest+branch%3Amain)

## Usage

```bash
nvm use v18
node cli.js \
-R time-loop/*-cdk \
-R time-loop/\*-cdk \
-T ghp_0123456789abcdefghijABCDEFGHIJabcdefgh \
--octoherd-bypass-confirms true \
--majorVersion v11
--library @time-loop/cdk-ecs-fargate \
--versionRequirement \>=5.15.2
```

## Options

| option | type | default | description |
| ----------------- | ------ | ------- | ------------------ |
| `--majorVersion` | string | none | major version number for the library, for example v11 |
| `--libray` | string | `@time-loop/cdk-library` | full name of the library to be updated via renovate |


## TODO

- detect and address case where PR is not up-to-date with base branch.
| option | type | default | description |
| ---------------------- | ------ | ------------------------ | --------------------------------------------------- |
| `--versionRequirement` | string | none | requirement for the library, for example `14.*` |
| `--library` | string | `@time-loop/cdk-library` | full name of the library to be updated via renovate |

See [semver](https://www.npmjs.com/package/semver) for details around specifying the `versionRequirement`.

## Limitations

- Should be re-written in TypeScript, but all examples were JS, and we're tight for time.
- Not projen-ified, which is kinda tragic.
I feel that these two technologies are deeply complementary.
https://github.com/projen/projen/issues/2841
- Doesn't differentiate between failed status checks which are required vs optional.
Or... maybe the rollup does? I haven't checked.
- Not published to npmjs.com, so you have to run it locally.
We use github packages, so... we'll probably never publish this to npmjs.com.
Either way, not a priority right now.
Expand Down
4 changes: 2 additions & 2 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export async function script(
try {
// skip archived repos
if (repository.archived) {
octokit.log.info(`${repository.full_name} is archived, skipping.`);
octokit.log.debug(`${repository.full_name} is archived, skipping.`);
return;
}

Expand Down Expand Up @@ -68,7 +68,7 @@ export async function script(
}

if (versions.length < 1) {
octokit.log.error(`${repository.full_name} does not have ${library} in ${path}`);
octokit.log.debug(`${repository.full_name} does not have ${library} in ${path}`);
return;
}

Expand Down