From 5736edd7b65c182f7eae11415944c15aa29678ca Mon Sep 17 00:00:00 2001 From: Adam Setch Date: Mon, 8 Jul 2024 16:22:26 -0400 Subject: [PATCH 1/5] feat: align filters by using legend component (#1344) --- src/routes/Filters.tsx | 11 +++-------- src/routes/__snapshots__/Filters.test.tsx.snap | 8 ++++---- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/src/routes/Filters.tsx b/src/routes/Filters.tsx index 295044fd9..83a055698 100644 --- a/src/routes/Filters.tsx +++ b/src/routes/Filters.tsx @@ -6,6 +6,7 @@ import { import { type FC, useContext } from 'react'; import { Header } from '../components/Header'; import { Checkbox } from '../components/fields/Checkbox'; +import { Legend } from '../components/settings/Legend'; import { AppContext } from '../context/App'; import { BUTTON_CLASS_NAME } from '../styles/gitify'; import { Size } from '../types'; @@ -36,10 +37,7 @@ export const FiltersRoute: FC = () => {
Filters
- - - Users - + Users {
- - - Reason - + Reason Note: if no reasons are selected, all notifications will be shown. diff --git a/src/routes/__snapshots__/Filters.test.tsx.snap b/src/routes/__snapshots__/Filters.test.tsx.snap index fc2c4fbae..af8151c81 100644 --- a/src/routes/__snapshots__/Filters.test.tsx.snap +++ b/src/routes/__snapshots__/Filters.test.tsx.snap @@ -42,8 +42,8 @@ exports[`routes/Filters.tsx General should render itself & its children 1`] = ` class="mb-3" >

{children}

+

+ {props.children} +

); }; diff --git a/src/components/__snapshots__/Header.test.tsx.snap b/src/components/__snapshots__/Header.test.tsx.snap index 98717155d..b5bf11c58 100644 --- a/src/components/__snapshots__/Header.test.tsx.snap +++ b/src/components/__snapshots__/Header.test.tsx.snap @@ -30,9 +30,28 @@ exports[`components/Header.tsx should render itself & its children 1`] = `

- Test Header + + + Test Header +

@@ -63,9 +82,28 @@ exports[`components/Header.tsx should render itself & its children 1`] = `

- Test Header + + + Test Header +

, diff --git a/src/routes/Accounts.tsx b/src/routes/Accounts.tsx index 41a859ffa..60e77c572 100644 --- a/src/routes/Accounts.tsx +++ b/src/routes/Accounts.tsx @@ -45,7 +45,7 @@ export const AccountsRoute: FC = () => { return (
-
Accounts
+
Accounts
{auth.accounts.map((account) => ( diff --git a/src/routes/Filters.tsx b/src/routes/Filters.tsx index 83a055698..7b40c5d92 100644 --- a/src/routes/Filters.tsx +++ b/src/routes/Filters.tsx @@ -1,5 +1,6 @@ import { FeedPersonIcon, + FilterIcon, FilterRemoveIcon, NoteIcon, } from '@primer/octicons-react'; @@ -34,7 +35,9 @@ export const FiltersRoute: FC = () => { return (
-
Filters
+
+ Filters +
Users diff --git a/src/routes/LoginWithOAuthApp.tsx b/src/routes/LoginWithOAuthApp.tsx index bd3b26573..9d0e7df3e 100644 --- a/src/routes/LoginWithOAuthApp.tsx +++ b/src/routes/LoginWithOAuthApp.tsx @@ -128,10 +128,7 @@ export const LoginWithOAuthApp: FC = () => { return (
-
- - Login with OAuth App -
+
Login with OAuth App
{ return ( <> -
- - Login with Personal Access Token -
+
Login with Personal Access Token
{ const { resetSettings } = useContext(AppContext); return (
-
Settings
+
+ Settings +
diff --git a/src/routes/__snapshots__/Accounts.test.tsx.snap b/src/routes/__snapshots__/Accounts.test.tsx.snap index 30e6212d1..da96fff28 100644 --- a/src/routes/__snapshots__/Accounts.test.tsx.snap +++ b/src/routes/__snapshots__/Accounts.test.tsx.snap @@ -30,9 +30,28 @@ exports[`routes/Accounts.tsx General should render itself & its children 1`] = `

- Accounts + + + Accounts +

- Filters + + + Filters +

- - Login with OAuth App + + Login with OAuth App +

- - Login with OAuth App + + Login with OAuth App +

- - Login with Personal Access Token + + Login with Personal Access Token +

- - Login with Personal Access Token + + Login with Personal Access Token +

- Settings + + + Settings +

Date: Mon, 8 Jul 2024 20:48:03 -0400 Subject: [PATCH 3/5] build: check for PR labels (#1342) --- .github/workflows/label.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/label.yml diff --git a/.github/workflows/label.yml b/.github/workflows/label.yml new file mode 100644 index 000000000..d9984b215 --- /dev/null +++ b/.github/workflows/label.yml @@ -0,0 +1,26 @@ +name: Check PR Label + +on: + pull_request: + types: [opened, edited, labeled, unlabeled] + +jobs: + check-label: + runs-on: ubuntu-latest + + steps: + - name: Check out the repository + uses: actions/checkout@v4 + + - name: Check if PR has labels + id: check_labels + run: | + labels=$(jq -r '.pull_request.labels | length' $GITHUB_EVENT_PATH) + if [ "$labels" -eq 0 ]; then + echo "No labels found on the PR" + exit 1 + fi + + - name: Set status + if: failure() + run: echo "Please add at least one label to the Pull Request." From 79d461c8c4ab2b8062af2e1907a02a97b9b9b629 Mon Sep 17 00:00:00 2001 From: Adam Setch Date: Tue, 9 Jul 2024 11:54:43 -0400 Subject: [PATCH 4/5] build: auto label prs (#1347) * build: auto label prs * build: auto label prs * build: auto label prs * build: auto label prs * build: auto label prs * build: update regex to support scope --- .github/labeler.yml | 45 +++++++++++++++++++++++++++++++++ .github/workflows/label.yml | 26 ------------------- .github/workflows/pr-triage.yml | 19 ++++++++++++++ 3 files changed, 64 insertions(+), 26 deletions(-) create mode 100644 .github/labeler.yml delete mode 100644 .github/workflows/label.yml create mode 100644 .github/workflows/pr-triage.yml diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 000000000..b90000d11 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,45 @@ +version: v1 + +labels: + - label: 'enhancement' + matcher: + title: '^feat(\(\w+\))?: .*' + + - label: 'bug' + matcher: + title: '^fix(\(\w+\))?: .*' + + - label: 'refactor' + matcher: + title: '^refactor(\(\w+\))?: .*' + + - label: 'documentation' + matcher: + title: '^docs(\(\w+\))?: .*' + + - label: 'test' + matcher: + title: '^test(\(\w+\))?: .*' + + - label: 'build' + matcher: + title: '^(ci|build)(\(\w+\))?: .*' + + - label: 'dependency' + matcher: + title: '^(deps)(\(\w+\))?: .*' + +checks: + - context: 'Semantic Pull Request' + description: + success: Ready for review & merge. + failure: Missing semantic label for merge. + labels: + any: + - enhancement + - bug + - refactor + - documentation + - test + - build + - dependency \ No newline at end of file diff --git a/.github/workflows/label.yml b/.github/workflows/label.yml deleted file mode 100644 index d9984b215..000000000 --- a/.github/workflows/label.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Check PR Label - -on: - pull_request: - types: [opened, edited, labeled, unlabeled] - -jobs: - check-label: - runs-on: ubuntu-latest - - steps: - - name: Check out the repository - uses: actions/checkout@v4 - - - name: Check if PR has labels - id: check_labels - run: | - labels=$(jq -r '.pull_request.labels | length' $GITHUB_EVENT_PATH) - if [ "$labels" -eq 0 ]; then - echo "No labels found on the PR" - exit 1 - fi - - - name: Set status - if: failure() - run: echo "Please add at least one label to the Pull Request." diff --git a/.github/workflows/pr-triage.yml b/.github/workflows/pr-triage.yml new file mode 100644 index 000000000..03f130e1c --- /dev/null +++ b/.github/workflows/pr-triage.yml @@ -0,0 +1,19 @@ +name: Triage PR + +on: + pull_request: + types: [opened, edited, synchronize, ready_for_review] + branches: [master, main] + +permissions: + contents: read # the config file + pull-requests: write # for labeling pull requests (on: pull_request_target or on: pull_request) + statuses: write # to generate status + checks: write # to generate status + +jobs: + labeler: + name: Labeler + runs-on: ubuntu-latest + steps: + - uses: fuxingloh/multi-labeler@v4 \ No newline at end of file From 44bcb03e809979f1c77014a54df035bdb9ad7b3c Mon Sep 17 00:00:00 2001 From: Adam Setch Date: Tue, 9 Jul 2024 12:01:28 -0400 Subject: [PATCH 5/5] build(release): a fresh attempt to use default github_token (#1348) --- .github/workflows/release.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3358143e7..744575781 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,6 +6,9 @@ on: - 'release/v**' workflow_dispatch: # For manually running release process to verify codesigning of artifacts +permissions: + contents: write + jobs: release-macos: name: Publish macOS (electron-builder) @@ -30,7 +33,6 @@ jobs: APPLEID_TEAM_ID: ${{ secrets.appleid_teamid }} CSC_LINK: ${{ secrets.mac_certs }} CSC_KEY_PASSWORD: ${{ secrets.mac_certs_password }} - GH_TOKEN: ${{ secrets.gh_token }} NOTARIZE: true - uses: actions/upload-artifact@v4 with: @@ -55,8 +57,6 @@ jobs: OAUTH_CLIENT_ID: ${{ secrets.oauth_client_id }} OAUTH_CLIENT_SECRET: ${{ secrets.oauth_client_secret }} - run: pnpm make:win --publish onTagOrDraft - env: - GH_TOKEN: ${{ secrets.gh_token }} - uses: actions/upload-artifact@v4 with: name: Gitify-release-win @@ -80,8 +80,6 @@ jobs: OAUTH_CLIENT_ID: ${{ secrets.oauth_client_id }} OAUTH_CLIENT_SECRET: ${{ secrets.oauth_client_secret }} - run: pnpm make:linux --publish onTagOrDraft - env: - GH_TOKEN: ${{ secrets.gh_token }} - uses: actions/upload-artifact@v4 with: name: Gitify-release-linux