Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AAriam committed Oct 24, 2023
1 parent 54092e0 commit 0657390
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 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.dev140"
version = "0.0.0.dev141"
name = "RepoDynamics"
dependencies = [
"packaging >= 23.2, < 24",
Expand Down
2 changes: 2 additions & 0 deletions src/repodynamics/actions/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,8 @@ def event_issues(self):
event_handler = {
"opened": self.event_issues_opened,
}
if self.issue_triggering_action not in event_handler:
return
event_handler[self.issue_triggering_action]()
return

Expand Down
4 changes: 2 additions & 2 deletions src/repodynamics/meta/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,13 @@ def get_issue_form_from_labels(self, label_names: list[str]) -> dict:
)

def get_issue_data_from_labels(self, label_names: list[str]) -> Issue:
prefix = {
type_prefix = {
"primary_type": self._data["label"]["group"]["primary_type"]["prefix"],
"sub_type": self._data["label"]["group"].get("sub_type", {}).get("prefix"),
}
label = {}
for label_name in label_names:
for label_type, prefix in prefix.items():
for label_type, prefix in type_prefix.items():
if prefix and label_name.startswith(prefix):
if label.get(label_type) is not None:
raise ValueError(f"Label '{label_name}' with type {label_type} is a duplicate.")
Expand Down

0 comments on commit 0657390

Please sign in to comment.