Commit Graph

10 Commits

Author SHA1 Message Date
Adam Azarchs
751921c443 fix: correct reading of sync-labels input. (#480)
* fix: correct reading of sync-labels input.

Contrary to the assumptions made in the unit tests, core.getInput
always returns a string, and !!'false' is true.

Also updates the unit test to reduce changes of regressions by ensuring
that the mocked getInput returns a string, as it would in production.

Fixes https://github.com/actions/labeler/issues/112

Make sure test catches regressions.

* Rebuild dist/index.js.
2023-03-23 10:47:14 +01:00
Ivan
8d81f881dd Add and configure ESLint and update configuration for Prettier (#508)
* Add ESLint and update Prettier

* Rebuild action

* Update package.json
2023-03-09 15:02:17 +02:00
IvanZosimov
0cad484cd0 Add .prettierrc.json to configure Prettier, reformat code 2022-12-19 17:09:22 +01:00
dependabot[bot]
9b2da75f4b Bump @actions/github from 2.2.0 to 5.0.0 (#161)
* Bump @actions/github from 2.2.0 to 5.0.0

Bumps [@actions/github](https://github.com/actions/toolkit/tree/HEAD/packages/github) from 2.2.0 to 5.0.0.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/github/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/github)

---
updated-dependencies:
- dependency-name: "@actions/github"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* update licensed cache

* Code changes to support github 5.0

* regenerate dist/index

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Patrick Ellis <patrick.j.ellis@gmail.com>
2021-06-21 11:39:52 -04:00
Patrick Ellis
c97a9580dd Update prettier to 2.3.0 and re-prettify everything
Gotta love those trailing commas!
2021-06-04 16:14:32 -04:00
Patrick Ellis
a1aa618e7a Fix recursive glob behavior in our npm format script command 2021-06-04 15:55:26 -04:00
Patrick Ellis
c9d0dfc82e 🧹 Add tests that run the whole action (#149) 2021-06-04 14:46:22 -04:00
Patrick Ellis
9019323db1 🧹 Add basic unit tests (#148)
This is not intended to be a comprehensive test suite; I'm just trying to get us started by adding tests for some of the most important functionality.

This necessitated some minor refactoring. Previously, `main.ts` just directly invoked the main entrypoint function `run()`, which made it impossible to unit test the module without causing the side-effects of `run`. 

As a workaround I created  a new module `labeler.ts`, which just exports the functions we want to test without executing the main entrypoint, and simplified `main.ts` so that it only imports the entrypoint and executes it.

It's basically just a re-org. The diff makes it look way more complicated than it is.
2021-06-03 16:15:47 -04:00
David Kale
fa244eaba5 Paginate and remove old labels (#96)
* Paginate to get all changed files. Add option to remove labels

* build

* format and build
2020-09-08 13:09:16 -04:00
Shawn Napora
7d083c498f Update to labeler v2 (#4)
* labeler v2

* update docs
2019-08-08 13:07:40 -04:00