Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
lucemia committed Jun 14, 2024
1 parent e6869f9 commit 1d7b37a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/pr-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Commitlint PR Title

on:
pull_request:
types: [opened, edited, labeled, unlabeled]
types: [opened, labeled, unlabeled]

jobs:
commitlint:
Expand Down
5 changes: 5 additions & 0 deletions src/pr_lint/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"\U0001F1E0-\U0001F1FF" # Flags (iOS)
"\U0001F900-\U0001F9FF" # Supplemental Symbols and Pictographs
"\U0001FA70-\U0001FAFF" # Symbols and Pictographs Extended-A
"\u2600-\u26FF" # Miscellaneous Symbols
"\u2700-\u27BF" # Dingbats
"]+"
)

Expand Down Expand Up @@ -78,6 +80,9 @@ def main() -> None:

# format new title as [Type Emoji][Title][Other Emojis]

import pdb

pdb.set_trace()
type_emoji = "".join(extract_emoji(type_labels[0].name))
other_emojis = set()
for label in other_labels:
Expand Down
1 change: 1 addition & 0 deletions src/pr_lint/tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def test_clean_title(title: str, snapshot: SnapshotAssertion) -> None:
[
("🐛fix: correct typo🐛", {"🐛"}),
("🚀feature(add-new): add a new feature🚀", {"🚀"}),
("✨Type: Feature", {"✨"}),
("bug: fix issue 🐞", {"🐞"}),
("no type", set()),
("not an emoji prefix: but contains 🚀 emoji", {"🚀"}),
Expand Down

0 comments on commit 1d7b37a

Please sign in to comment.