55
66import * as vscode from 'vscode' ;
77import { getExtensionContext } from '@/helpers/context' ;
8- import { pullRequestTreeDataProvider , commitTreeDataProvider } from '@/views' ;
98import {
109 commandValidateToken ,
1110 commandUpdateToken ,
@@ -16,12 +15,16 @@ import {
1615 commandSwitchToPull ,
1716 commandPullViewItemSwitchToPull ,
1817 commandPullViewItemOpenOnGitHub ,
18+ commandPullViewRefreshPullList ,
19+ commandPullViewLoadMorePulls ,
1920} from './pull' ;
2021import {
2122 commandSwitchToCommit ,
2223 commandOpenCommitOnGitHub ,
2324 commandCommitViewItemSwitchToCommit ,
2425 commandCommitViewItemOpenOnGitHub ,
26+ commandCommitViewRefreshCommitList ,
27+ commandCommitViewLoadMoreCommits ,
2528} from './commit' ;
2629import { commandOpenGitpod } from './gitpod' ;
2730import {
@@ -36,6 +39,7 @@ import {
3639 commandOpenEditorGutterBlame ,
3740 commandCloseEditorGutterBlame ,
3841} from './blame' ;
42+ import { commandOpenOnGitHub } from './global' ;
3943
4044const commands : { id : string ; callback : ( ...args : any [ ] ) => any } [ ] = [
4145 // validate GitHub OAuth Token
@@ -53,7 +57,9 @@ const commands: { id: string; callback: (...args: any[]) => any }[] = [
5357 // switch to a pull request & input pull number manually
5458 { id : 'github1s.switch-to-pull' , callback : commandSwitchToPull } ,
5559 // update the pull request list in the pull requests view
56- { id : 'github1s.pull-view-refresh-pull-list' , callback : ( ) => pullRequestTreeDataProvider . updateTree ( ) } , // prettier-ignore
60+ { id : 'github1s.pull-view-refresh-pull-list' , callback : commandPullViewRefreshPullList } , // prettier-ignore
61+ // load more pulls in the pull requests tree view
62+ { id : 'github1s.pull-view-load-more-pulls' , callback : commandPullViewLoadMorePulls } , // prettier-ignore
5763 // switch to a pull request in the pull requests view
5864 { id : 'github1s.pull-view-item-switch-to-pull' , callback : commandPullViewItemSwitchToPull } , // prettier-ignore
5965 // open pull on github in the pull requests view
@@ -64,7 +70,9 @@ const commands: { id: string; callback: (...args: any[]) => any }[] = [
6470 // open a commit on GitHub's website
6571 { id : 'github1s.open-commit-on-github' , callback : commandOpenCommitOnGitHub } ,
6672 // update the commit list in the commits view
67- { id : 'github1s.commit-view-refresh-commit-list' , callback : ( ) => commitTreeDataProvider . updateTree ( ) } , // prettier-ignore
73+ { id : 'github1s.commit-view-refresh-commit-list' , callback : commandCommitViewRefreshCommitList } , // prettier-ignore
74+ // load more commits in the commits tree view
75+ { id : 'github1s.commit-view-load-more-commits' , callback : commandCommitViewLoadMoreCommits } , // prettier-ignore
6876 // switch to a commit in the commits view
6977 { id : 'github1s.commit-view-item-switch-to-commit' , callback : commandCommitViewItemSwitchToCommit } , // prettier-ignore
7078 // open commit on github in the commits view
@@ -90,6 +98,9 @@ const commands: { id: string; callback: (...args: any[]) => any }[] = [
9098 { id : 'github1s.open-editor-gutter-blame' , callback : commandOpenEditorGutterBlame } , // prettier-ignore
9199 // close the gutter blame of a editor
92100 { id : 'github1s.close-editor-gutter-blame' , callback : commandCloseEditorGutterBlame } , // prettier-ignore
101+
102+ // open current page on GitHub
103+ { id : 'github1s.open-on-github' , callback : commandOpenOnGitHub } ,
93104] ;
94105
95106export const registerGitHub1sCommands = ( ) => {
0 commit comments