mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 05:00:55 +01:00
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
This commit is contained in:
@@ -7,31 +7,34 @@
|
||||
// the label will not be removed
|
||||
export const file_labels = {
|
||||
GitHub: {
|
||||
filepaths: [".github"],
|
||||
filepaths: [".github/"],
|
||||
},
|
||||
SQL: {
|
||||
filepaths: ["SQL"],
|
||||
filepaths: ["SQL/"],
|
||||
},
|
||||
"Map Edit": {
|
||||
filepaths: ["_maps"],
|
||||
filepaths: ["_maps/"],
|
||||
file_extensions: [".dmm"],
|
||||
},
|
||||
Tools: {
|
||||
filepaths: ["tools"],
|
||||
filepaths: ["tools/"],
|
||||
},
|
||||
"Config Update": {
|
||||
filepaths: ["config", "code/controllers/configuration/entries"],
|
||||
filepaths: ["config/", "code/controllers/configuration/entries/"],
|
||||
add_only: true,
|
||||
},
|
||||
Sprites: {
|
||||
filepaths: ["icons"],
|
||||
filepaths: ["icons/"],
|
||||
file_extensions: [".dmi"],
|
||||
add_only: true,
|
||||
},
|
||||
Sound: {
|
||||
filepaths: ["sound"],
|
||||
filepaths: ["sound/"],
|
||||
file_extensions: [".ogg"],
|
||||
add_only: true,
|
||||
},
|
||||
UI: {
|
||||
filepaths: ["tgui"],
|
||||
filepaths: ["tgui/"],
|
||||
add_only: true,
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user