Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

๐Ÿ“Š improve etl pr command #3634

Merged
merged 9 commits into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion apps/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@ def cli_back() -> None:
"update": "apps.step_update.cli.cli",
"archive": "apps.step_update.cli.archive_cli",
"explorer-update": "apps.explorer_update.cli.cli",
"pr": "apps.utils.draft_pull_request.cli",
"prr": "apps.utils.draft_pull_request.cli",
"pr": "apps.pr.cli.cli",
},
},
{
Expand Down
Empty file added apps/pr/__init__.py
Empty file.
69 changes: 69 additions & 0 deletions apps/pr/categories.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Add EMOJIs for each PR type
PR_CATEGORIES = {
"data": {
"emoji": "๐Ÿ“Š",
"emoji_raw": ":bar_chart:",
"description": "data update or addition",
},
"bug": {
"emoji": "๐Ÿ›",
"emoji_raw": ":bug:",
"description": "bug fix for the user",
},
"refactor": {
"emoji": "๐Ÿ”จ",
"emoji_raw": ":hammer:",
"description": "a code change that neither fixes a bug nor adds a feature for the user",
},
"enhance": {
"emoji": "โœจ",
"emoji_raw": ":sparkles:",
"description": "visible improvement over a current implementation without adding a new feature or fixing a bug",
},
"feature": {
"emoji": "๐ŸŽ‰",
"emoji_raw": ":tada:",
"description": "new feature for the user",
},
"docs": {
"emoji": "๐Ÿ“œ",
"emoji_raw": ":scroll:",
"description": "documentation only changes",
"shortcut_key": "0",
},
"chore": {
"emoji": "๐Ÿงน",
"emoji_raw": ":honeybee:",
"description": "upgrading dependencies, tooling, etc. No production code change",
},
"style": {
"emoji": "๐Ÿ’„",
"emoji_raw": ":lipstick:",
"description": "formatting, missing semi colons, etc. No production code change",
},
"wip": {
"emoji": "๐Ÿšง",
"emoji_raw": ":construction:",
"description": "work in progress - intermediate commits that will be explained later on",
},
"tests": {
"emoji": "โœ…",
"emoji_raw": ":white_check_mark:",
"description": "adding missing tests, refactoring tests, etc. No production code change",
},
}
PR_CATEGORIES_MD_DESCRIPTION = "- " + "\n- ".join(
f"**{choice}**: {choice_params['description']}" for choice, choice_params in PR_CATEGORIES.items()
)
PR_CATEGORIES_CHOICES = [
{
"title": f"{v['emoji']} {k}",
"value": k,
"shortcut_key": v.get("shortcut_key", k[0]),
}
for k, v in PR_CATEGORIES.items()
]
PR_CATEGORIES_CHOICES = sorted(PR_CATEGORIES_CHOICES, key=lambda x: x["shortcut_key"])
assert len(set([x["shortcut_key"].lower() for x in PR_CATEGORIES_CHOICES])) == len(
PR_CATEGORIES_CHOICES
), "Shortcut keys must be unique"
Loading