Repository: gitify-app/gitify (ts)

Issue:
Discussion comment notification does not point to the comment.
### 🔍 Is there already an issue for your problem?

- [X] I have checked older issues, open and closed

### 📝 Description


If I click a gift notification by other commenter's reply in a discussion, it doesn't directly go to the comment.
Instead it redirects me to Discussion tab page (i.e. `https://<ghes-url>/<org>/<repo>/discussions`).
Which means I manually have to find out what exact discussion has a comment that notified me.

I found out that that it is because `#discussioncomment-<sum-number>` is missing in the gitify notification.
When I click a notification in **Github (GHES)'s Notification page**, the link url is like

```
https://<ghes-url>/<org>/<repo>/discussions/15?notification_referrer_id=MDE4Ok5vdGlmaWNhdGlvblRocmVhZDE5NDQzNzEwOjk2OTAw#discussioncomment-13072
```
which redirects me to the correct comment.

BUT the same notification in **gitify** is missing the said `#discussioncomment`:

```
https://<ghes-url>/<org>/<repo>/discussions/15?notification_referrer_id=MDE4Ok5vdGlmaWNhdGlvblRocmVhZDE5NDQzNzEwOjk2OTAw
```


btw our corporate is using GitHub Enterprise Server 3.11.15.


### 🪜 Steps To Reproduce

(in GHES)
1. Make another person to reply to any discussion that I am in the thread. Get 'commented' notification.
2. Gitify notifies me, so click the notification.
3. It drops me off at `<org>/<repo>/<discussion>` page, not to the specific discussion's comment.

### Gitify Version

5.16.2

### Operating System

macOS

### GitHub Account

GitHub Cloud

### 📸 Screenshots

_No response_

Pull request:
fix(discussions): answered discussions only available in GHES 3.12 or higher
resolves #1645

Patch:
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
index f3c78935..9706eb12 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -13,9 +13,10 @@ body:
           required: true
 
   - type: textarea
+    id: description
     attributes:
       label: 📝 Description
-      description: List steps to reproduce the error and details on what happens and what you expected to happen.
+      description: Describe what happens and what you expected to happen.
     validations:
       required: true
 
@@ -23,7 +24,7 @@ body:
     id: steps-to-reproduce
     attributes:
       label: 🪜 Steps To Reproduce
-      description: Steps to reproduce the behavior.
+      description: List out steps to reproduce the behavior.
       placeholder: |
         1. Go to '...'
         2. Click on '...'
@@ -32,6 +33,14 @@ body:
     validations:
       required: true
 
+  - type: textarea
+    id: logs
+    attributes:
+      label: 🪵 Log Excerpts
+      description: Share any relevant log excerpts where available - see https://gitify.io/faq
+    validations:
+      required: false
+
   - type: input
     id: app-version
     attributes:
diff --git a/package.json b/package.json
index 547b4c64..2c22009f 100644
--- a/package.json
+++ b/package.json
@@ -130,8 +130,8 @@
     "electron-log": "5.2.4",
     "electron-updater": "6.3.9",
     "menubar": "9.5.1",
-    "react": "18.3.1",
-    "react-dom": "18.3.1",
+    "react": "19.0.0",
+    "react-dom": "19.0.0",
     "react-router-dom": "6.28.0",
     "update-electron-app": "3.0.0"
   },
@@ -144,7 +144,8 @@
     "@types/jest": "29.5.14",
     "@types/node": "22.10.1",
     "@types/nprogress": "0.2.3",
-    "@types/react": "18.3.14",
+    "@types/react": "19.0.1",
+    "@types/react-dom": "19.0.2",
     "@types/react-router-dom": "5.3.3",
     "autoprefixer": "10.4.20",
     "axios": "1.7.9",
@@ -181,7 +182,7 @@
     "webpack-cli": "5.1.4",
     "webpack-merge": "6.0.1"
   },
-  "packageManager": "pnpm@9.14.4",
+  "packageManager": "pnpm@9.15.0",
   "lint-staged": {
     "*": "biome check --fix --no-errors-on-unmatched",
     "*.{js,ts,tsx}": "pnpm test -- --findRelatedTests -u --passWithNoTests"
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 9133d335..47b359ff 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -21,14 +21,14 @@ importers:
         specifier: 9.5.1
         version: 9.5.1(electron@33.2.1)
       react:
-        specifier: 18.3.1
-        version: 18.3.1
+        specifier: 19.0.0
+        version: 19.0.0
       react-dom:
-        specifier: 18.3.1
-        version: 18.3.1(react@18.3.1)
+        specifier: 19.0.0
+        version: 19.0.0(react@19.0.0)
       react-router-dom:
         specifier: 6.28.0
-        version: 6.28.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+        version: 6.28.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0)
       update-electron-app:
         specifier: 3.0.0
         version: 3.0.0
@@ -44,10 +44,10 @@ importers:
         version: 2.5.0
       '@primer/octicons-react':
         specifier: 19.13.0
-        version: 19.13.0(react@18.3.1)
+        version: 19.13.0(react@19.0.0)
       '@testing-library/react':
         specifier: 16.1.0
-        version: 16.1.0(@testing-library/dom@10.0.0)(@types/react-dom@18.2.22)(@types/react@18.3.14)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+        version: 16.1.0(@testing-library/dom@10.0.0)(@types/react-dom@19.0.2(@types/react@19.0.1))(@types/react@19.0.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)
       '@types/jest':
         specifier: 29.5.14
         version: 29.5.14
@@ -58,8 +58,11 @@ importers:
         specifier: 0.2.3
         version: 0.2.3
       '@types/react':
-        specifier: 18.3.14
-        version: 18.3.14
+        specifier: 19.0.1
+        version: 19.0.1
+      '@types/react-dom':
+        specifier: 19.0.2
+        version: 19.0.2(@types/react@19.0.1)
       '@types/react-router-dom':
         specifier: 5.3.3
         version: 5.3.3
@@ -131,7 +134,7 @@ importers:
         version: 8.1.1(postcss@8.4.49)(typescript@5.7.2)(webpack@5.97.1)
       react-final-form:
         specifier: 6.5.9
-        version: 6.5.9(final-form@4.20.10)(react@18.3.1)
+        version: 6.5.9(final-form@4.20.10)(react@19.0.0)
       rimraf:
         specifier: 6.0.1
         version: 6.0.1
@@ -759,11 +762,10 @@ packages:
   '@types/plist@3.0.5':
     resolution: {integrity: sha512-E6OCaRmAe4WDmWNsL/9RMqdkkzDCY1etutkflWk4c+AcjDU07Pcz1fQwTX0TQz+Pxqn9i4L1TU3UFpjnrcDgxA==}
 
-  '@types/prop-types@15.7.12':
-    resolution: {integrity: sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q==}
-
-  '@types/react-dom@18.2.22':
-    resolution: {integrity: sha512-fHkBXPeNtfvri6gdsMYyW+dW7RXFo6Ad09nLFK0VQWR7yGLai/Cyvyj696gbwYvBnhGtevUG9cET0pmUbMtoPQ==}
+  '@types/react-dom@19.0.2':
+    resolution: {integrity: sha512-c1s+7TKFaDRRxr1TxccIX2u7sfCnc3RxkVyBIUA2lCpyqCF+QoAwQ/CBg7bsMdVwP120HEH143VQezKtef5nCg==}
+    peerDependencies:
+      '@types/react': ^19.0.0
 
   '@types/react-router-dom@5.3.3':
     resolution: {integrity: sha512-kpqnYK4wcdm5UaWI3fLcELopqLrHgLqNsdpHauzlQktfkHL3npOSwtj1Uz9oKBAzs7lFtVkV8j83voAz2D8fhw==}
@@ -771,8 +773,8 @@ packages:
   '@types/react-router@5.1.20':
     resolution: {integrity: sha512-jGjmu/ZqS7FjSH6owMcD5qpq19+1RS9DeVRqfl1FeBMxTDQAGwlMWOcs52NDoXaNKyG3d1cYQFMs9rCrb88o9Q==}
 
-  '@types/react@18.3.14':
-    resolution: {integrity: sha512-NzahNKvjNhVjuPBQ+2G7WlxstQ+47kXZNHlUvFakDViuIEfGY926GqhMueQFZ7woG+sPiQKlF36XfrIUVSUfFg==}
+  '@types/react@19.0.1':
+    resolution: {integrity: sha512-YW6614BDhqbpR5KtUYzTA+zlA7nayzJRA9ljz9CQoxthR0sDisYZLuvSMsil36t4EH/uAt8T52Xb4sVw17G+SQ==}
 
   '@types/responselike@1.0.3':
     resolution: {integrity: sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==}
@@ -2595,10 +2597,6 @@ packages:
     resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==}
     engines: {node: '>=10'}
 
-  loose-envify@1.4.0:
-    resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==}
-    hasBin: true
-
   lower-case@2.0.2:
     resolution: {integrity: sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==}
 
@@ -3285,10 +3283,10 @@ packages:
   randombytes@2.1.0:
     resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==}
 
-  react-dom@18.3.1:
-    resolution: {integrity: sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==}
+  react-dom@19.0.0:
+    resolution: {integrity: sha512-4GV5sHFG0e/0AD4X+ySy6UJd3jVl1iNsNHdpad0qhABJ11twS3TTBnseqsKurKcsNqCEFeGL3uLpVChpIO3QfQ==}
     peerDependencies:
-      react: ^18.3.1
+      react: ^19.0.0
 
   react-final-form@6.5.9:
     resolution: {integrity: sha512-x3XYvozolECp3nIjly+4QqxdjSSWfcnpGEL5K8OBT6xmGrq5kBqbA6+/tOqoom9NwqIPPbxPNsOViFlbKgowbA==}
@@ -3315,8 +3313,8 @@ packages:
     peerDependencies:
       react: '>=16.8'
 
-  react@18.3.1:
-    resolution: {integrity: sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==}
+  react@19.0.0:
+    resolution: {integrity: sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ==}
     engines: {node: '>=0.10.0'}
 
   read-binary-file-arch@1.0.6:
@@ -3450,8 +3448,8 @@ packages:
     resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==}
     engines: {node: '>=v12.22.7'}
 
-  scheduler@0.23.2:
-    resolution: {integrity: sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==}
+  scheduler@0.25.0:
+    resolution: {integrity: sha512-xFVuu11jh+xcO7JOAGJNOXld8/TcEHK/4CituBUeUb5hqxJLj9YuemAEuvm9gQ/+pgXYfbQuqAkiYu+u7YEsNA==}
 
   schema-utils@3.3.0:
     resolution: {integrity: sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==}
@@ -4666,9 +4664,9 @@ snapshots:
   '@pkgjs/parseargs@0.11.0':
     optional: true
 
-  '@primer/octicons-react@19.13.0(react@18.3.1)':
+  '@primer/octicons-react@19.13.0(react@19.0.0)':
     dependencies:
-      react: 18.3.1
+      react: 19.0.0
 
   '@remix-run/router@1.21.0': {}
 
@@ -4701,15 +4699,15 @@ snapshots:
       lz-string: 1.5.0
       pretty-format: 27.5.1
 
-  '@testing-library/react@16.1.0(@testing-library/dom@10.0.0)(@types/react-dom@18.2.22)(@types/react@18.3.14)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)':
+  '@testing-library/react@16.1.0(@testing-library/dom@10.0.0)(@types/react-dom@19.0.2(@types/react@19.0.1))(@types/react@19.0.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)':
     dependencies:
       '@babel/runtime': 7.24.1
       '@testing-library/dom': 10.0.0
-      react: 18.3.1
-      react-dom: 18.3.1(react@18.3.1)
+      react: 19.0.0
+      react-dom: 19.0.0(react@19.0.0)
     optionalDependencies:
-      '@types/react': 18.3.14
-      '@types/react-dom': 18.2.22
+      '@types/react': 19.0.1
+      '@types/react-dom': 19.0.2(@types/react@19.0.1)
 
   '@tootallnate/once@2.0.0': {}
 
@@ -4830,27 +4828,23 @@ snapshots:
       xmlbuilder: 15.1.1
     optional: true
 
-  '@types/prop-types@15.7.12': {}
-
-  '@types/react-dom@18.2.22':
+  '@types/react-dom@19.0.2(@types/react@19.0.1)':
     dependencies:
-      '@types/react': 18.3.14
-    optional: true
+      '@types/react': 19.0.1
 
   '@types/react-router-dom@5.3.3':
     dependencies:
       '@types/history': 4.7.11
-      '@types/react': 18.3.14
+      '@types/react': 19.0.1
       '@types/react-router': 5.1.20
 
   '@types/react-router@5.1.20':
     dependencies:
       '@types/history': 4.7.11
-      '@types/react': 18.3.14
+      '@types/react': 19.0.1
 
-  '@types/react@18.3.14':
+  '@types/react@19.0.1':
     dependencies:
-      '@types/prop-types': 15.7.12
       csstype: 3.1.3
 
   '@types/responselike@1.0.3':
@@ -7129,10 +7123,6 @@ snapshots:
       chalk: 4.1.2
       is-unicode-supported: 0.1.0
 
-  loose-envify@1.4.0:
-    dependencies:
-      js-tokens: 4.0.0
-
   lower-case@2.0.2:
     dependencies:
       tslib: 2.6.2
@@ -7782,37 +7772,34 @@ snapshots:
     dependencies:
       safe-buffer: 5.2.1
 
-  react-dom@18.3.1(react@18.3.1):
+  react-dom@19.0.0(react@19.0.0):
     dependencies:
-      loose-envify: 1.4.0
-      react: 18.3.1
-      scheduler: 0.23.2
+      react: 19.0.0
+      scheduler: 0.25.0
 
-  react-final-form@6.5.9(final-form@4.20.10)(react@18.3.1):
+  react-final-form@6.5.9(final-form@4.20.10)(react@19.0.0):
     dependencies:
       '@babel/runtime': 7.24.1
       final-form: 4.20.10
-      react: 18.3.1
+      react: 19.0.0
 
   react-is@17.0.2: {}
 
   react-is@18.2.0: {}
 
-  react-router-dom@6.28.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
+  react-router-dom@6.28.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0):
     dependencies:
       '@remix-run/router': 1.21.0
-      react: 18.3.1
-      react-dom: 18.3.1(react@18.3.1)
-      react-router: 6.28.0(react@18.3.1)
+      react: 19.0.0
+      react-dom: 19.0.0(react@19.0.0)
+      react-router: 6.28.0(react@19.0.0)
 
-  react-router@6.28.0(react@18.3.1):
+  react-router@6.28.0(react@19.0.0):
     dependencies:
       '@remix-run/router': 1.21.0
-      react: 18.3.1
+      react: 19.0.0
 
-  react@18.3.1:
-    dependencies:
-      loose-envify: 1.4.0
+  react@19.0.0: {}
 
   read-binary-file-arch@1.0.6:
     dependencies:
@@ -7957,9 +7944,7 @@ snapshots:
     dependencies:
       xmlchars: 2.2.0
 
-  scheduler@0.23.2:
-    dependencies:
-      loose-envify: 1.4.0
+  scheduler@0.25.0: {}
 
   schema-utils@3.3.0:
     dependencies:
diff --git a/src/renderer/hooks/useInterval.ts b/src/renderer/hooks/useInterval.ts
index cfda92fc..f96a9a90 100644
--- a/src/renderer/hooks/useInterval.ts
+++ b/src/renderer/hooks/useInterval.ts
@@ -1,9 +1,8 @@
 import { useEffect, useRef } from 'react';
 
 // Thanks to https://overreacted.io/making-setinterval-declarative-with-react-hooks/
-
 export const useInterval = (callback, delay) => {
-  const savedCallback = useRef();
+  const savedCallback = useRef(null);
 
   // Remember the latest callback.
   useEffect(() => {
diff --git a/src/renderer/typesGitHub.ts b/src/renderer/typesGitHub.ts
index 5d648605..95e6b2ff 100644
--- a/src/renderer/typesGitHub.ts
+++ b/src/renderer/typesGitHub.ts
@@ -500,7 +500,7 @@ export interface Discussion {
   number: number;
   title: string;
   stateReason: DiscussionStateType;
-  isAnswered: boolean;
+  isAnswered: boolean | null;
   url: Link;
   author: DiscussionAuthor;
   comments: DiscussionComments;
diff --git a/src/renderer/utils/api/client.ts b/src/renderer/utils/api/client.ts
index e5c4e5dd..47e66da5 100644
--- a/src/renderer/utils/api/client.ts
+++ b/src/renderer/utils/api/client.ts
@@ -22,6 +22,7 @@ import type {
   Release,
   UserDetails,
 } from '../../typesGitHub';
+import { isAnsweredDiscussionFeatureSupported } from '../helpers';
 import { QUERY_SEARCH_DISCUSSIONS } from './graphql/discussions';
 import { formatAsGitHubSearchSyntax } from './graphql/utils';
 import { apiRequestAuth } from './request';
@@ -244,6 +245,9 @@ export async function searchDiscussions(
         firstDiscussions: 1,
         lastComments: 1,
         lastReplies: 1,
+        includeIsAnswered: isAnsweredDiscussionFeatureSupported(
+          notification.account,
+        ),
       },
     },
   );
diff --git a/src/renderer/utils/api/graphql/discussions.ts b/src/renderer/utils/api/graphql/discussions.ts
index 93ec4c91..edc7ca8d 100644
--- a/src/renderer/utils/api/graphql/discussions.ts
+++ b/src/renderer/utils/api/graphql/discussions.ts
@@ -27,6 +27,7 @@ export const QUERY_SEARCH_DISCUSSIONS = gql`
     $firstDiscussions: Int
     $lastComments: Int
     $lastReplies: Int
+    $includeIsAnswered: Boolean!
   ) {
     search(query: $queryStatement, type: DISCUSSION, first: $firstDiscussions) {
       nodes {
@@ -34,7 +35,7 @@ export const QUERY_SEARCH_DISCUSSIONS = gql`
           number
           title
           stateReason
-          isAnswered
+          isAnswered @include(if: $includeIsAnswered)
           url
           author {
             ...AuthorFields
diff --git a/src/renderer/utils/helpers.ts b/src/renderer/utils/helpers.ts
index e3b2a7bc..889e0461 100644
--- a/src/renderer/utils/helpers.ts
+++ b/src/renderer/utils/helpers.ts
@@ -27,9 +27,13 @@ export function isEnterpriseServerHost(hostname: Hostname): boolean {
   return !hostname.endsWith(Constants.DEFAULT_AUTH_OPTIONS.hostname);
 }
 
+/**
+ * Check if the "Mark as done" feature is supported for the given account.
+ *
+ * GitHub Cloud or GitHub Enterprise Server 3.13 or newer is required to support this feature.
+ */
 export function isMarkAsDoneFeatureSupported(account: Account): boolean {
   if (isEnterpriseServerHost(account.hostname)) {
-    // Support for "Mark as done" was added to GitHub Enterprise Server in v3.13 or newer
     if (account.version) {
       const version = account?.version.split('.').map(Number);
       return version[0] >= 3 && version[1] >= 13;
@@ -41,6 +45,26 @@ export function isMarkAsDoneFeatureSupported(account: Account): boolean {
   return true;
 }
 
+/**
+ * Check if the "answered" discussions are supported for the given account.
+ *
+ * GitHub Cloud or GitHub Enterprise Server 3.12 or newer is required to support this feature.
+ */
+export function isAnsweredDiscussionFeatureSupported(
+  account: Account,
+): boolean {
+  if (isEnterpriseServerHost(account.hostname)) {
+    if (account.version) {
+      const version = account?.version.split('.').map(Number);
+      return version[0] >= 3 && version[1] >= 12;
+    }
+
+    return false;
+  }
+
+  return true;
+}
+
 export function generateNotificationReferrerId(
   notification: Notification,
 ): string {


Test patch:
diff --git a/src/renderer/utils/helpers.test.ts b/src/renderer/utils/helpers.test.ts
index 3656aaf6..56f3beef 100644
--- a/src/renderer/utils/helpers.test.ts
+++ b/src/renderer/utils/helpers.test.ts
@@ -27,6 +27,7 @@ import {
   getChevronDetails,
   getFilterCount,
   getPlatformFromHostname,
+  isAnsweredDiscussionFeatureSupported,
   isEnterpriseServerHost,
   isMarkAsDoneFeatureSupported,
 } from './helpers';
@@ -110,6 +111,50 @@ describe('renderer/utils/helpers.ts', () => {
     });
   });
 
+  describe('isAnsweredDiscussionFeatureSupported', () => {
+    it('should return true for GitHub Cloud', () => {
+      expect(isAnsweredDiscussionFeatureSupported(mockGitHubCloudAccount)).toBe(
+        true,
+      );
+    });
+
+    it('should return false for GitHub Enterprise Server < v3.12', () => {
+      const account = {
+        ...mockGitHubEnterpriseServerAccount,
+        version: '3.11.0',
+      };
+
+      expect(isAnsweredDiscussionFeatureSupported(account)).toBe(false);
+    });
+
+    it('should return true for GitHub Enterprise Server >= v3.12', () => {
+      const account = {
+        ...mockGitHubEnterpriseServerAccount,
+        version: '3.12.3',
+      };
+
+      expect(isAnsweredDiscussionFeatureSupported(account)).toBe(true);
+    });
+
+    it('should return false for GitHub Enterprise Server when partial version available', () => {
+      const account = {
+        ...mockGitHubEnterpriseServerAccount,
+        version: '3',
+      };
+
+      expect(isAnsweredDiscussionFeatureSupported(account)).toBe(false);
+    });
+
+    it('should return false for GitHub Enterprise Server when no version available', () => {
+      const account = {
+        ...mockGitHubEnterpriseServerAccount,
+        version: null,
+      };
+
+      expect(isMarkAsDoneFeatureSupported(account)).toBe(false);
+    });
+  });
+
   describe('generateNotificationReferrerId', () => {
     it('should generate the notification_referrer_id', () => {
       const referrerId = generateNotificationReferrerId(mockSingleNotification);