MCPcopy Index your code
hub / github.com/conwnet/github1s / getChangedFiles

Function getChangedFiles

extensions/github1s/src/changes/files.ts:84–101  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

82};
83
84export const getChangedFiles = async (): Promise<VSCodeChangedFile[]> => {
85 const routerState = await router.getState();
86 const scheme = adapterManager.getCurrentScheme();
87
88 // code review page
89 if (routerState.pageType === adapterTypes.PageType.CodeReview) {
90 const repository = Repository.getInstance(scheme, routerState.repo);
91 const codeReview = await repository.getCodeReviewItem(routerState.codeReviewId);
92 return codeReview ? getCodeReviewChangedFiles(codeReview) : [];
93 }
94 // commit page
95 else if (routerState.pageType === adapterTypes.PageType.Commit) {
96 const repository = Repository.getInstance(scheme, routerState.repo);
97 const commit = await repository.getCommitItem(routerState.commitSha);
98 return commit ? getCommitChangedFiles(commit) : [];
99 }
100 return [];
101};
102
103// get the title of the diff editor
104export const getChangedFileDiffTitle = (

Callers 2

index.tsFile · 0.90

Calls 7

getCommitChangedFilesFunction · 0.85
getStateMethod · 0.80
getCurrentSchemeMethod · 0.80
getCodeReviewItemMethod · 0.80
getCommitItemMethod · 0.80
getInstanceMethod · 0.45

Tested by

no test coverage detected