Commit Graph

6 Commits

Author SHA1 Message Date
Bloop
f3b20a5515 [No GBP] Makes sure the labeler can't readd labels that were explicitly removed by maintainers (#92614) 2025-08-19 22:50:59 -06:00
Bloop
458e0b1470 Allows labeler action to add/remove labels from the PR title/body on sync (#92553)
## About The Pull Request

Followup to https://github.com/tgstation/tgstation/pull/92504

Removes the conditional that was stopping the labeler from checking the
PR body for labels on sync.

<details><summary>No more of this weirdness</summary>

<img width="877" height="488" alt="firefox_zppJmK5qz2"
src="https://github.com/user-attachments/assets/74a556b5-a3e3-40e7-93dd-e18c62ed9649"
/>

</details>

Any time someone updates a PR and it syncs, you can potentially lose
some of the PR labels from the body (the changelog specifically) if they
are not configured as `add_only` in the autoLabelConfig.js

I had kept it in previously since it was how it was before, but thinking
on it I do not think this is even necessary anymore now that the php
webhook method is replaced with the action. Let's remove it!

## Why It's Good For The Game

QoL for maintainers and contributors

## Changelog

Nothing player-facing
2025-08-15 16:56:59 -06:00
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
Jeremiah
8757460daf [tgui] Linter fixes 1 (#91951)
## About The Pull Request
Atomized PR from converting us to biome. This converts all cases where
we're using `let` but it's never reassigned. This is considered a safe
fix
https://biomejs.dev/linter/rules/use-const/

## Command
Get [Biome](https://biomejs.dev/guides/manual-installation/) (the
executable, at least)
`biome lint --write --only "useConst"`


## Why It's Good For The Game
Moving us to a simple linter/formatter and shaving off a number of
packages, tech debt
## Changelog
Should be absolutely zero effect on gameplay
2025-07-06 22:10:21 +02:00
Jeremiah
9db2f6916b Sets prettier to run on the repo (#91379)
## About The Pull Request
Prettier (an auto formatter) is set to only run within the tgui folder
currently. This removes that limitation, allowing it to automatically
format all supported files in the repo (.js, .html, .yml
[etc](https://prettier.io/docs/))

I made a few exceptions for bundled and generated files
## Why It's Good For The Game
I'm of the opinion that code should look uniform and am lazy enough to
want CTRL-S to format files without having to think beyond that
## Changelog
2025-05-29 21:23:59 -07:00
MrMelbert
a6e33ed6ac Moves PR Labeling from webhook processor to Github actions (#89190)
## About The Pull Request

Strips auto-labeling behavior from the webhook processor to an action.
All that remains in the webhook processor is ingame PR announcements,
"changelog validation" (which is either broken or we have disabled), and
handling for "request review" (which we have disabled)

Keywords have been maintained 1:1, unless I missed something or
accidentally shoved something where it shouldn't be

I wanted to link this to the changelog parser but that seems like a
slightly larger project so I'll just throw this up as-is

Note: I'm not very experienced in writing actions so review with
scrutiny

## Why

Actions are a lot easier to maintain and set up for downstreams

Adding new labels should now be like, 10x easier since all you need to
do is slap it in the config file

Webhook processor is also kinda old an breaks semi-frequently

### (Tested)


![image](https://github.com/user-attachments/assets/7fe50ca7-3b18-4d6c-abcf-58c9195380bd)


![image](https://github.com/user-attachments/assets/c1643a27-27c6-420e-b6e5-355a450b0ab3)
2025-01-27 20:53:31 -07:00