diff --git a/.github/workflows/conflict-labeler.yml b/.github/workflows/labeler-conflict.yml similarity index 100% rename from .github/workflows/conflict-labeler.yml rename to .github/workflows/labeler-conflict.yml diff --git a/.github/workflows/labeler-needsreview.yml b/.github/workflows/labeler-needsreview.yml index 819b34b7bbd..4d895cad771 100644 --- a/.github/workflows/labeler-needsreview.yml +++ b/.github/workflows/labeler-needsreview.yml @@ -3,10 +3,17 @@ on: pull_request_target: types: [review_requested] + pull_request_review: + types: [submitted] + +permissions: + pull-requests: write + contents: write jobs: add_label: runs-on: ubuntu-latest + if: github.event_name == 'pull_request_target' steps: - uses: actions-ecosystem/action-add-labels@v1 with: @@ -14,3 +21,23 @@ jobs: - uses: actions-ecosystem/action-remove-labels@v1 with: labels: "S: Awaiting Changes" + + handle_review: + runs-on: ubuntu-latest + if: github.event_name == 'pull_request_review' + steps: + - uses: actions-ecosystem/action-add-labels@v1 + if: | + github.event.review.state == 'changes_requested' && + (github.event.review.author_association == 'OWNER' || + github.event.review.author_association == 'MEMBER') + with: + labels: "S: Awaiting Changes" + + - uses: actions-ecosystem/action-remove-labels@v1 + if: | + github.event.review.state == 'changes_requested' && + (github.event.review.author_association == 'OWNER' || + github.event.review.author_association == 'MEMBER') + with: + labels: "S: Needs Review" diff --git a/.github/workflows/labeler-size.yml b/.github/workflows/labeler-size.yml new file mode 100644 index 00000000000..418faed79b8 --- /dev/null +++ b/.github/workflows/labeler-size.yml @@ -0,0 +1,21 @@ +name: "Labels: Size" +on: pull_request_target +jobs: + size-label: + runs-on: ubuntu-latest + steps: + - name: size-label + uses: "pascalgn/size-label-action@v0.5.5" + env: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + with: + # Custom size configuration + # DeltaV: changed to powers of 4 + sizes: > + { + "0": "XS", + "16": "S", + "64": "M", + "256": "L", + "1024": "XL" + } diff --git a/Content.Client/Administration/UI/BanPanel/BanPanel.xaml.cs b/Content.Client/Administration/UI/BanPanel/BanPanel.xaml.cs index 588d62e5603..3c7322d4739 100644 --- a/Content.Client/Administration/UI/BanPanel/BanPanel.xaml.cs +++ b/Content.Client/Administration/UI/BanPanel/BanPanel.xaml.cs @@ -22,11 +22,11 @@ namespace Content.Client.Administration.UI.BanPanel; [GenerateTypedNameReferences] public sealed partial class BanPanel : DefaultWindow { - public event Action? BanSubmitted; + public event Action? BanSubmitted; public event Action? PlayerChanged; private string? PlayerUsername { get; set; } private (IPAddress, int)? IpAddress { get; set; } - private byte[]? Hwid { get; set; } + private ImmutableTypedHwid? Hwid { get; set; } private double TimeEntered { get; set; } private uint Multiplier { get; set; } private bool HasBanFlag { get; set; } @@ -371,9 +371,8 @@ private void OnIpChanged() private void OnHwidChanged() { var hwidString = HwidLine.Text; - var length = 3 * (hwidString.Length / 4) - hwidString.TakeLast(2).Count(c => c == '='); - Hwid = new byte[length]; - if (HwidCheckbox.Pressed && !(string.IsNullOrEmpty(hwidString) && LastConnCheckbox.Pressed) && !Convert.TryFromBase64String(hwidString, Hwid, out _)) + ImmutableTypedHwid? hwid = null; + if (HwidCheckbox.Pressed && !(string.IsNullOrEmpty(hwidString) && LastConnCheckbox.Pressed) && !ImmutableTypedHwid.TryParse(hwidString, out hwid)) { ErrorLevel |= ErrorLevelEnum.Hwid; HwidLine.ModulateSelfOverride = Color.Red; @@ -390,7 +389,7 @@ private void OnHwidChanged() Hwid = null; return; } - Hwid = Convert.FromHexString(hwidString); + Hwid = hwid; } private void OnTypeChanged() diff --git a/Content.Client/Administration/UI/Notes/NoteEdit.xaml b/Content.Client/Administration/UI/Notes/NoteEdit.xaml index 506abac540c..72b2c55ce8d 100644 --- a/Content.Client/Administration/UI/Notes/NoteEdit.xaml +++ b/Content.Client/Administration/UI/Notes/NoteEdit.xaml @@ -8,6 +8,7 @@