Skip to content

Commit

Permalink
fix: validation msg #3885
Browse files Browse the repository at this point in the history
  • Loading branch information
johannesjo committed Jan 17, 2025
1 parent fae85b0 commit 645b18e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/app/features/issue/providers/github/github.const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
} from '../../../config/global-config.model';
import { IssueProviderGithub } from '../../issue.model';
import { ISSUE_PROVIDER_COMMON_FORM_FIELDS } from '../../common-issue-form-stuff.const';
import { FormlyFieldConfig } from '@ngx-formly/core';

export const DEFAULT_GITHUB_CFG: GithubCfg = {
isEnabled: false,
Expand Down Expand Up @@ -49,8 +48,7 @@ export const GITHUB_CONFIG_FORM: LimitedFormlyFieldConfig<IssueProviderGithub>[]
validators: {
token: {
expression: (c: { value: string | undefined }) => c.value?.startsWith('ghp_'),
message: (error: any, field: FormlyFieldConfig) =>
`${field.formControl?.value} ${T.F.GITHUB.FORM.INVALID_TOKEN_MESSAGE}`,
message: T.F.GITHUB.FORM.INVALID_TOKEN_MESSAGE,
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@
"IS_ASSIGNEE_FILTER": "Only import issues assigned to me to backlog",
"REPO": "username/repositoryName",
"TOKEN": "Access Token",
"INVALID_TOKEN_MESSAGE": "is not a valid GitHub token. It must start with \"ghp_\"."
"INVALID_TOKEN_MESSAGE": "Not a valid GitHub token. It must start with \"ghp_\"."
},
"FORM_SECTION": {
"HELP": "<p>Here you can configure SuperProductivity to list open GitHub issues for a specific repository in the task creation panel in the daily planning view. They will be listed as suggestions and will provide a link to the issue as well as more information about it.</p> <p>In addition you can automatically import all open issues.</p><p>To get by usage limits and to access you can provide a an access token. <a href='https://docs.github.com/en/free-pro-team@latest/developers/apps/scopes-for-oauth-apps'>More info about its scopes can be found here</a>.",
Expand Down

0 comments on commit 645b18e

Please sign in to comment.