From dbad10984a99b6eb9234ec71f2891a136b6a572b Mon Sep 17 00:00:00 2001 From: Luna Date: Fri, 9 Jun 2023 19:48:18 +0000 Subject: [PATCH] [skip ci] Don't run ci on forks; Fix interaction nicks in SMYN (#4) The following actions are disabled unless run on the main repo: codeberg, publish, build/upload, reportBrokenPlugins Reviewed-on: https://codeberg.org/Ven/cord/pulls/4 Co-authored-by: Luna Co-committed-by: Luna --- .github/workflows/build.yml | 2 ++ .github/workflows/codeberg-mirror.yml | 1 + .github/workflows/publish.yml | 1 + .github/workflows/reportBrokenPlugins.yml | 1 + src/plugins/showMeYourName/index.tsx | 1 + src/utils/constants.ts | 4 ++++ 6 files changed, 10 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cc27604..3815d0d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -50,6 +50,7 @@ jobs: echo "release_tag=$(git rev-parse --short HEAD)" >> $GITHUB_ENV - name: Upload DevBuild as release + if: github.repository == 'Vendicated/Vencord' run: | gh release upload devbuild --clobber dist/* gh release edit devbuild --title "DevBuild $RELEASE_TAG" @@ -58,6 +59,7 @@ jobs: RELEASE_TAG: ${{ env.release_tag }} - name: Upload DevBuild to builds repo + if: github.repository == 'Vendicated/Vencord' run: | git config --global user.name "$USERNAME" git config --global user.email actions@github.com diff --git a/.github/workflows/codeberg-mirror.yml b/.github/workflows/codeberg-mirror.yml index 3ccca7f..ac2956b 100644 --- a/.github/workflows/codeberg-mirror.yml +++ b/.github/workflows/codeberg-mirror.yml @@ -7,6 +7,7 @@ on: jobs: codeberg: + if: github.repository == 'Vendicated/Vencord' runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 0d0e7e4..9d56e9a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -6,6 +6,7 @@ on: jobs: Publish: + if: github.repository == 'Vendicated/Vencord' runs-on: ubuntu-latest steps: diff --git a/.github/workflows/reportBrokenPlugins.yml b/.github/workflows/reportBrokenPlugins.yml index 58c4bce..8bc9361 100644 --- a/.github/workflows/reportBrokenPlugins.yml +++ b/.github/workflows/reportBrokenPlugins.yml @@ -7,6 +7,7 @@ on: jobs: TestPlugins: + if: github.repository == 'Vendicated/Vencord' runs-on: ubuntu-latest steps: diff --git a/src/plugins/showMeYourName/index.tsx b/src/plugins/showMeYourName/index.tsx index ee43331..473e2f7 100644 --- a/src/plugins/showMeYourName/index.tsx +++ b/src/plugins/showMeYourName/index.tsx @@ -63,6 +63,7 @@ export default definePlugin({ settings, renderUsername: ({ author, message, isRepliedMessage, withMentionPrefix }: UsernameProps) => { + if (message.interaction) return author?.nick; try { const { username } = message.author; const { nick } = author; diff --git a/src/utils/constants.ts b/src/utils/constants.ts index 0e53313..01a4485 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -319,6 +319,10 @@ export const Devs = /* #__PURE__*/ Object.freeze({ name: "amia", id: 142007603549962240n }, + ImLvna: { + name: "Luna <3", + id: 174200708818665472n + } } satisfies Record); // iife so #__PURE__ works correctly