Mikescops / git-notify-extension

🦊🐙 Browser Extension for GitLab (Chrome, Edge & Firefox). Don't miss any Gitlab Merge Requests and rocket up your productivity.
https://addons.mozilla.org/en-US/firefox/addon/gitlab-notify/
114 stars 10 forks source link

Typo in to-do list for general notifications #86

Closed k-le closed 1 year ago

k-le commented 1 year ago

Browser: Firefox

Issue: There's a typo for general notifications under the to-do list tab.

Behavior: "**Your** received a notification"

Expected behavior: "**You** received a notification"

Recommended fix: In gitlab-notify-extension/src/popup-components/TodoItem.tsx, the variable actionToText has a default case in the switch statement that is responsible for the displayed text for the items under the to-do tab. Update the return value to the expected behavior.

const actionToText = (author: string, action: string) => {
    switch (action) {
        case 'assigned':
            return author + ' assigned you to';
        case 'mentioned':
            return author + ' mentioned you in';
        case 'build_failed':
            return 'The build failed for';
        case 'approval_required':
            return author + ' set you as an approver on';
        case 'unmergeable':
            return 'The following MR cannot be merged';
        case 'directly_addressed':
            return author + ' tagged you in';
        case 'marked':
            return 'You were marked on';
        default:
            return 'You received a notification';  // fix
    }
};