Commit Graph

9 Commits

Author SHA1 Message Date
MaksimZhukov
917e5cce72 Merge branch 'main' 2023-10-24 12:11:31 +02:00
Mark Ridgwell
327d35fdca Added ability to pass in an optional PR number as a parameter (#349)
* Adding pr-number as an optional parameter

* Updated README

* Tests on the pr-number parameter

* Added missing | to table

* re-built script

* Adding support for multiple pr-numbers

* excluded .idea

* Updated readme to reflect that there might be more than one PR

* Additional warning

* Removed unused

* Reformatted and re-built

* Corrected message

* Removed required check

* Added (s) to pull request numbers in the description

Co-authored-by: MaksimZhukov <46996400+MaksimZhukov@users.noreply.github.com>

* Reworded PR-number parameter description

Co-authored-by: MaksimZhukov <46996400+MaksimZhukov@users.noreply.github.com>

* adding getMultilineInput into the tests

* Fixing tests for single pr

* Fixing tests for multiple prs

* Updated README.md to make it more obvious that it can take a list of PRs

* Added example that labels PR's 1-3

* Handled no pull requests better (from code review)

* Handled no pull requests better (from code review)

* Handled missing pull request better (from code review)

* Back out suggested change as it broke the tests

* Rebuilt dist

* Update src/labeler.ts

Co-authored-by: MaksimZhukov <46996400+MaksimZhukov@users.noreply.github.com>

* Added Emphasis to the note

Co-authored-by: MaksimZhukov <46996400+MaksimZhukov@users.noreply.github.com>

* Changed mockInput for pr-number to be string[]

---------

Co-authored-by: MaksimZhukov <46996400+MaksimZhukov@users.noreply.github.com>
2023-07-06 17:10:50 +02:00
Mark Massoud
7a202e6428 fix: Limit number of labels added to 100 (#497)
* push to excess labels to avoid reaching the limit

* build dist

* never set more than 100 labels

* use splice instead of set

* ignore IDE folders

* install @octokit/plugin-retry

* always setLabels

* fix indentations

* fix specs

* add spec for excess labels

* prettier

* licensed cache

* revert to !!core.getInput('sync-labels')

* better warning for exceeded labels

* keep manually-added labels

* nest the dedupe logic

* rename `removeLabel` to `removeLabelFromList` to avoid confusion

* use Sets, and issue a call only if labels have actually changed

* remove IDE config folders from gitignore

* remove obsolete duplucation check

---------

Co-authored-by: Mark Massoud <mark@unrealcloud.io>
2023-06-21 11:49:43 +02:00
Josh Dales
0b6e68d75a Add options for getting the head or base branch 2023-01-28 17:57:52 -05: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