Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AAriam committed Oct 20, 2023
1 parent 4a22ea3 commit b2670c5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespaces = true
# ----------------------------------------- Project Metadata -------------------------------------
#
[project]
version = "0.0.0.dev105"
version = "0.0.0.dev106"
name = "RepoDynamics"
dependencies = [
"packaging >= 23.2, < 24",
Expand Down
15 changes: 12 additions & 3 deletions src/repodynamics/actions/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,7 @@ def event_push_branch_deleted(self):
return

def event_push_branch_modified(self):
self.get_changed_files()
if self.ref_is_main:
if not self.git.get_tags():
self.event_first_release()
Expand Down Expand Up @@ -646,7 +647,8 @@ def action_meta(self):
action = self._meta_sync
self.logger.input(f"Read action from workflow dispatch input: {action}")
else:
action = self.metadata["workflow"]["init"]["meta_check_action"][self.event_type.value]
metadata_raw = self.meta.read_metadata_raw()
action = metadata_raw["workflow"]["init"]["meta_check_action"][self.event_type.value]
self.logger.input(
f"Read action from 'meta.workflow.init.meta_check_action.{self.event_type.value}': {action}"
)
Expand Down Expand Up @@ -1235,14 +1237,21 @@ def get_changed_files(self) -> list[str]:
changed_groups_str += f", {file_type.value.title}"
if changed_groups_str:
oneliner = f"Found changes in following groups: {changed_groups_str[2:]}."
if summary_detail[RepoFileType.SUPERMETA]:
oneliner = (
f"This event modified SuperMeta files; "
f"make sure to double-check that everything is correct❗ {oneliner}"
)
else:
oneliner = "No changes were found."
legend = [f"{status.value.emoji}{status.value.title}" for status in FileChangeType]
color_legend = html.details(content=html.ul(legend), summary="Color Legend")
summary_details.insert(0, html.ul([oneliner, color_legend]))
self.add_summary(
name=name,
status="pass" if changed_groups_str else "skip",
status="warning" if summary_detail[RepoFileType.SUPERMETA] else (
"pass" if changed_groups_str else "skip"
),
oneliner=oneliner,
details=html.ElementCollection(summary_details)
)
Expand Down Expand Up @@ -1355,7 +1364,7 @@ def assemble_summary(self) -> str:
def add_summary(
self,
name: str,
status: Literal['pass', 'fail', 'skip'],
status: Literal['pass', 'fail', 'skip', 'warning'],
oneliner: str,
details: str | html.Element | html.ElementCollection | None = None,
):
Expand Down
1 change: 1 addition & 0 deletions src/repodynamics/emoji.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ class Emoji:
"PASS": "✅",
"SKIP": "❎",
"FAIL": "❌",
"WARNING": "⚠️",
"PLAY": "▶️",
}

Expand Down

0 comments on commit b2670c5

Please sign in to comment.