Don’t run update-pr-from-base-branch if personal token is undefined#3411
Closed
yakov116 wants to merge 2 commits intorefined-github:masterfrom
Closed
Don’t run update-pr-from-base-branch if personal token is undefined#3411yakov116 wants to merge 2 commits intorefined-github:masterfrom
update-pr-from-base-branch if personal token is undefined#3411yakov116 wants to merge 2 commits intorefined-github:masterfrom
Conversation
fregante
reviewed
Jul 28, 2020
| const [outOfDateContainer] = select.all('.completeness-indicator-problem + .status-heading') | ||
| .filter(title => title.textContent!.includes('out-of-date')); | ||
| const outOfDateContainer = select.all('.completeness-indicator-problem + .status-heading') | ||
| .find(title => title.textContent!.includes('out-of-date')); |
980594a to
fbf862a
Compare
fregante
reviewed
Jul 28, 2020
fregante
reviewed
Jul 28, 2020
| @@ -54,7 +54,7 @@ export class RefinedGitHubAPIError extends Error { | |||
| } | |||
| } | |||
|
|
|||
Member
There was a problem hiding this comment.
What if you export a function instead?
Suggested change
| export async function expectToken(): string { | |
| const {personalToken} = await settings; | |
| if (!personalToken) { | |
| throw new Error('Personal token required for this feature'); | |
| } | |
| return personalToken; | |
| } | |
And then call it in api.v4 too
Member
Author
There was a problem hiding this comment.
👍 (just stepped away from the computer. will do it a drop later)
Member
Author
There was a problem hiding this comment.
I know why I didn't do that.
Since I do not want to throw, I just want to log the error.
The reason it does not error out by all the other features, is because logError takes over.
WDYT?
Member
There was a problem hiding this comment.
The reason it does not error out by all the other features, is because logError takes over.
That's the mechanism that we need to use. This error would be also caught by logError, won't it?
Member
Author
There was a problem hiding this comment.
It does not, it throws.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
LINKED ISSUES:
Resolves "Update Branch" button: show warning if PAT is undefined #2679
TEST URLS:
This pr just remove your token
SCREENSHOT:
None
PS: Regarding the unrelated lint, let me know if I should revert.