From 82383740ef027b1df27ec5b3e4e4b2dab32d8fb2 Mon Sep 17 00:00:00 2001 From: RayBB Date: Tue, 7 Jan 2025 17:40:01 -0500 Subject: [PATCH] improve documentation about GitHub tokens --- docs/concept/concept-for-2-file-sync.md | 2 +- docs/github-access-token-instructions.md | 24 +++++++++++++------ electron/main-window.ts | 2 +- .../gitea/gitea-issue/gitea-issue-map.util.ts | 2 +- .../features/ui-helper/ui-helper.service.ts | 2 +- .../worklog-export.component.ts | 2 +- src/app/imex/sync/encryption.ts | 2 +- 7 files changed, 23 insertions(+), 13 deletions(-) diff --git a/docs/concept/concept-for-2-file-sync.md b/docs/concept/concept-for-2-file-sync.md index fcfba86ab..abe075eea 100644 --- a/docs/concept/concept-for-2-file-sync.md +++ b/docs/concept/concept-for-2-file-sync.md @@ -68,7 +68,7 @@ We also need to save any incomplete syncs, so that we can warn the user if closi - try to download new archive file - (reattempt once if checksum check still fails (remote update might not be completed yet???)) - (if checksum check still fails, check once for new main file (via etag)) -- if any of the downloads fail show error message that sync couldnt be completed and ask if the user wants to try again +- if any of the downloads fail show error message that sync couldn't be completed and ask if the user wants to try again - if checksum check still fails after successful download, show error message and ask if local data should be used instead and if remote data should be overwritten - diff --git a/docs/github-access-token-instructions.md b/docs/github-access-token-instructions.md index 7e97101b7..9da247951 100644 --- a/docs/github-access-token-instructions.md +++ b/docs/github-access-token-instructions.md @@ -1,17 +1,27 @@ -# Howto generate a Access Token with Privilegs +# How to generate an Access Token with Privileges -## Personal Access Token -For polling Gitlab Issues you need to provide a access Token. +## GitLab Personal Access Token +For polling GitLab Issues, you need to provide an access token. -1. Got to User Settings / Access tokens (On Github you can go [here](https://github.com/settings/personal-access-tokens)) -2. Add new Token with the Scope `api` +1. Go to User Settings / Access tokens (for GitHub see below) +2. Add a new token with the scope `api` ![Personal Token](https://github.com/user-attachments/assets/76fb204e-450a-4516-9d93-897ae2a32f6d) ## Project Access Token -If you self-host Gitlab or have the Premium / Ultimate license it's possible to get a Project Access Token. Which are scoped to this Project. -The scope is similiar to the Personal Access token but you set also a role. Which Role can do what? Documentation +If you self-host GitLab or have the Premium/Ultimate license, it's possible to get a Project Access Token, which is scoped to a project. +The scope is similar to the Personal Access token, but you also set a role. To learn what each role can do, see the Documentation. ![Project Token](https://github.com/user-attachments/assets/f008f114-3d3e-450d-9301-7825222f9812) + +## GitHub Personal Access Token + +To generate a GitHub Personal Access Token: + +1. Navigate to GitHub's [Personal Access Tokens (Classic)](https://github.com/settings/tokens) page + - Note: Fine-grained tokens are not currently supported +2. Click "Generate new token (classic)" +3. Select the `repo` scope to grant access to private repositories +4. Click "Generate token" and securely store the token value diff --git a/electron/main-window.ts b/electron/main-window.ts index 35af42014..9ea05f4bf 100644 --- a/electron/main-window.ts +++ b/electron/main-window.ts @@ -201,7 +201,7 @@ function initWinEventListeners(app: any): void { return { action: 'deny' }; }); - // TODO refactor quiting mess + // TODO refactor quitting mess appCloseHandler(app); appMinimizeHandler(app); } diff --git a/src/app/features/issue/providers/gitea/gitea-issue/gitea-issue-map.util.ts b/src/app/features/issue/providers/gitea/gitea-issue/gitea-issue-map.util.ts index a7f271701..d86c1f098 100644 --- a/src/app/features/issue/providers/gitea/gitea-issue/gitea-issue-map.util.ts +++ b/src/app/features/issue/providers/gitea/gitea-issue/gitea-issue-map.util.ts @@ -12,7 +12,7 @@ export const mapGiteaIssueToSearchResult = (issue: GiteaIssue): SearchResultItem }; }; -// Gitea uses the issue number intead of issue id to track the issues +// Gitea uses the issue number instead of issue id to track the issues export const mapGiteaIssueIdToIssueNumber = (issue: GiteaIssue): GiteaIssue => { return { ...issue, id: issue.number }; }; diff --git a/src/app/features/ui-helper/ui-helper.service.ts b/src/app/features/ui-helper/ui-helper.service.ts index 02842cac8..2918ae8e7 100644 --- a/src/app/features/ui-helper/ui-helper.service.ts +++ b/src/app/features/ui-helper/ui-helper.service.ts @@ -42,7 +42,7 @@ export class UiHelperService { focusApp(): void { if (IS_ELECTRON) { - // otherwise the last focused task get's focused again leading to unintended keyboard events + // otherwise the last focused task gets focused again leading to unintended keyboard events if (document.activeElement) { (document.activeElement as HTMLElement).blur(); } diff --git a/src/app/features/worklog/worklog-export/worklog-export.component.ts b/src/app/features/worklog/worklog-export/worklog-export.component.ts index 2df47fe65..4d62f4211 100644 --- a/src/app/features/worklog/worklog-export/worklog-export.component.ts +++ b/src/app/features/worklog/worklog-export/worklog-export.component.ts @@ -152,7 +152,7 @@ export class WorklogExportComponent implements OnInit, OnDestroy { this.options = { ...WORKLOG_EXPORT_DEFAULTS, ...advancedCfg.worklogExportSettings, - // NOTE: if we don't do this typescript(?) get's aggressive + // NOTE: if we don't do this typescript(?) gets aggressive cols: [ ...(advancedCfg.worklogExportSettings ? [...advancedCfg.worklogExportSettings.cols] diff --git a/src/app/imex/sync/encryption.ts b/src/app/imex/sync/encryption.ts index 9ac12e0ab..08ac79090 100644 --- a/src/app/imex/sync/encryption.ts +++ b/src/app/imex/sync/encryption.ts @@ -23,7 +23,7 @@ const _generateKey = async (password: string): Promise => { const ops = { name: 'PBKDF2', // TODO this is probably not very secure - // on the other hand: the salt is used for saving the password securely, so maybe it is not imporant + // on the other hand: the salt is used for saving the password securely, so maybe it is not important // for our specific use case? We would need to need some security expert input on this salt: enc.encode(password), iterations: 1000,