Files
Bubberstation/tools/pull_request_hooks/autoLabelConfig.js
Bloop 52107b29a0 Redoes the labeler action js backend (#92504)
## About The Pull Request

Redoes the labeler script to work for private or restricted repositories
(both of which need an auth token for using the REST api).

Previous version used `fetch()`, and checked the line diffs which was
inefficient and unnecessary. You only really need to be checking the
filenames when it comes to the diffs.

Now it uses
[octokit.rest.pulls.listFiles](https://octokit.github.io/rest.js/v20/#pulls-list-files)
and pagination. This version is faster and can support a larger amount
of diffs, up to 3000 files changed, and plays nicely with auth tokens
for private or restricted repos. Hooray! Tested the various functions of
it & things should work same as before.

<img width="591" height="171" alt="image"
src="https://github.com/user-attachments/assets/15ff75e2-0335-4b18-b6d7-3aefb312d173"
/>

Also adds support for matching file extensions, so it can find .dmm and
.dmis that might be in directories that do not start with `_maps/` or
`icons/`.

Thanks to @Kocma-san for doing a large part of this and helping figure
out what the issue was.

## Changelog

Not player-facing
2025-08-12 18:37:20 -04:00

2.7 KiB