diff --git a/.github/labeler.yml b/.github/labeler.yml index 97b402eda9..69b2ca8774 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -16,7 +16,7 @@ - changed-files: - any-glob-to-any-file: '**/*.swsl' -"No C#": +"Changes: No C#": - changed-files: # Equiv to any-glob-to-all as long as this has one matcher. If ALL changed files are not C# files, then apply label. - all-globs-to-all-files: "!**/*.cs" diff --git a/.github/workflows/conflict-labeler.yml b/.github/workflows/labeler-conflict.yml similarity index 93% rename from .github/workflows/conflict-labeler.yml rename to .github/workflows/labeler-conflict.yml index 1e2125c30a..ebcc54d460 100644 --- a/.github/workflows/conflict-labeler.yml +++ b/.github/workflows/labeler-conflict.yml @@ -16,6 +16,6 @@ jobs: - name: Check for Merge Conflicts uses: eps1lon/actions-label-merge-conflict@v3.0.0 with: - dirtyLabel: "Merge Conflict" + dirtyLabel: "S: Merge Conflict" repoToken: "${{ secrets.GITHUB_TOKEN }}" commentOnDirty: "This pull request has conflicts, please resolve those before we can evaluate the pull request." diff --git a/.github/workflows/labeler-needsreview.yml b/.github/workflows/labeler-needsreview.yml index 311048acb0..819b34b7bb 100644 --- a/.github/workflows/labeler-needsreview.yml +++ b/.github/workflows/labeler-needsreview.yml @@ -10,7 +10,7 @@ jobs: steps: - uses: actions-ecosystem/action-add-labels@v1 with: - labels: "Status: Needs Review" + labels: "S: Needs Review" - uses: actions-ecosystem/action-remove-labels@v1 with: - labels: "Status: Awaiting Changes" + labels: "S: Awaiting Changes" diff --git a/.github/workflows/labeler-review.yml b/.github/workflows/labeler-review.yml new file mode 100644 index 0000000000..a0341e42a1 --- /dev/null +++ b/.github/workflows/labeler-review.yml @@ -0,0 +1,23 @@ +name: "Labels: Approved" +on: + pull_request_review: + types: [submitted] +jobs: + add_label: + # Change the repository name after you've made sure the team name is correct for your fork! + if: ${{ (github.repository == 'space-wizards/space-station-14') && (github.event.review.state == 'APPROVED') }} + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: tspascoal/get-user-teams-membership@v3 + id: checkUserMember + with: + username: ${{ github.actor }} + team: "content-maintainers,junior-maintainers" + GITHUB_TOKEN: ${{ secrets.GH_PAT }} + - if: ${{ steps.checkUserMember.outputs.isTeamMember == 'true' }} + uses: actions-ecosystem/action-add-labels@v1 + with: + labels: "S: Approved" diff --git a/.github/workflows/labeler-size.yml b/.github/workflows/labeler-size.yml new file mode 100644 index 0000000000..ad6e35c829 --- /dev/null +++ b/.github/workflows/labeler-size.yml @@ -0,0 +1,20 @@ +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 + sizes: > + { + "0": "XS", + "10": "S", + "30": "M", + "100": "L", + "1000": "XL" + } diff --git a/.github/workflows/labeler-stable.yml b/.github/workflows/labeler-stable.yml new file mode 100644 index 0000000000..f6fd2033a1 --- /dev/null +++ b/.github/workflows/labeler-stable.yml @@ -0,0 +1,16 @@ +name: "Labels: Branch stable" + +on: + pull_request_target: + types: + - opened + branches: + - 'stable' + +jobs: + add_label: + runs-on: ubuntu-latest + steps: + - uses: actions-ecosystem/action-add-labels@v1 + with: + labels: "Branch: Stable" diff --git a/.github/workflows/labeler-staging.yml b/.github/workflows/labeler-staging.yml new file mode 100644 index 0000000000..b46a198aef --- /dev/null +++ b/.github/workflows/labeler-staging.yml @@ -0,0 +1,16 @@ +name: "Labels: Branch staging" + +on: + pull_request_target: + types: + - opened + branches: + - 'staging' + +jobs: + add_label: + runs-on: ubuntu-latest + steps: + - uses: actions-ecosystem/action-add-labels@v1 + with: + labels: "Branch: Staging" diff --git a/.github/workflows/labeler-untriaged.yml b/.github/workflows/labeler-untriaged.yml index 775aab2654..ec1d194851 100644 --- a/.github/workflows/labeler-untriaged.yml +++ b/.github/workflows/labeler-untriaged.yml @@ -3,6 +3,8 @@ on: issues: types: [opened] + pull_request_target: + types: [opened] jobs: add_label: @@ -11,4 +13,4 @@ jobs: - uses: actions-ecosystem/action-add-labels@v1 if: join(github.event.issue.labels) == '' with: - labels: "Status: Untriaged" + labels: "S: Untriaged" diff --git a/Content.Client/Administration/UI/BanPanel/BanPanel.xaml.cs b/Content.Client/Administration/UI/BanPanel/BanPanel.xaml.cs index 588d62e560..3c7322d473 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 @@ public sealed partial class BanPanel : DefaultWindow 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 @@ public sealed partial class BanPanel : DefaultWindow 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 506abac540..72b2c55ce8 100644 --- a/Content.Client/Administration/UI/Notes/NoteEdit.xaml +++ b/Content.Client/Administration/UI/Notes/NoteEdit.xaml @@ -8,6 +8,7 @@