File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import * as vscode from "vscode" ;
22
33import { GitHubRepoContext } from "../../git/repository" ;
4- import { RepositoryPermission , hasWritePermission } from "../../git/repository-permissions" ;
4+ import { hasWritePermission } from "../../git/repository-permissions" ;
55import { RunStore } from "../../store/store" ;
66import { WorkflowRun } from "../../store/workflowRun" ;
77import { getIconForWorkflowRun } from "../icons" ;
@@ -21,16 +21,16 @@ export class WorkflowRunNode extends vscode.TreeItem {
2121 ) {
2222 super ( WorkflowRunNode . _getLabel ( run , workflowName ) , vscode . TreeItemCollapsibleState . Collapsed ) ;
2323
24- this . updateRun ( run , gitHubRepoContext . permissionLevel ) ;
24+ this . updateRun ( run ) ;
2525 }
2626
27- updateRun ( run : WorkflowRun , permissionLevel : RepositoryPermission ) {
27+ updateRun ( run : WorkflowRun ) {
2828 this . run = run ;
2929 this . label = WorkflowRunNode . _getLabel ( run , this . workflowName ) ;
3030
3131 const contextValues = [ "run" ] ;
3232 const completed = this . run . run . status === "completed" ;
33- if ( hasWritePermission ( permissionLevel ) ) {
33+ if ( hasWritePermission ( this . gitHubRepoContext . permissionLevel ) ) {
3434 contextValues . push ( completed ? "rerunnable" : "cancelable" ) ;
3535 }
3636 if ( completed ) {
You can’t perform that action at this time.
0 commit comments