Skip to content

Commit

Permalink
GA style display name for shell action
Browse files Browse the repository at this point in the history
  • Loading branch information
luismedel committed Sep 20, 2024
1 parent 3b13494 commit c26f12f
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/bluish/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,7 @@ def workflow(self) -> Optional["WorkflowContext"]:

@property
def display_name(self) -> str:
if self.attrs.name:
return self.attrs.name
elif self.attrs.uses:
return self.attrs.uses
else:
return self.id
return self.attrs.name if self.attrs.name else self.id

@property
def expression_parser(self) -> Callable[[str], Any]:
Expand Down Expand Up @@ -459,7 +454,7 @@ def workflow(self) -> WorkflowContext:
def display_name(self) -> str:
if self.attrs.name:
return self.attrs.name
elif self.attrs.uses:
elif self.attrs.uses and self.attrs.uses != action.DEFAULT_ACTION:
return self.attrs.uses
elif self.attrs.run:
return next(self.attrs.run.split("\n", maxsplit=1))
Expand Down

0 comments on commit c26f12f

Please sign in to comment.