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

[pivotal] Import deadline for Pivotal releases #60

Merged
merged 2 commits into from
Apr 12, 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
19 changes: 10 additions & 9 deletions pivotal-import/pivotal_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,19 +95,19 @@ def parse_priority(priority):


col_map = {
"id": "external_id",
"title": "name",
"accepted at": ("accepted_at", parse_date),
"created at": ("created_at", parse_date),
"current state": "pt_state",
"deadline": ("deadline", parse_date),
"description": "description",
"type": "story_type",
"estimate": ("estimate", int),
"priority": ("priority", parse_priority),
"current state": "pt_state",
"id": "external_id",
"labels": ("labels", parse_labels),
"url": ("external_links", url_to_external_links),
"created at": ("created_at", parse_date),
"accepted at": ("accepted_at", parse_date),
"deadline": ("deadline", parse_date),
"priority": ("priority", parse_priority),
"requested by": "requester",
"title": "name",
"type": "story_type",
"url": ("external_links", url_to_external_links),
}

nested_col_map = {
Expand All @@ -130,6 +130,7 @@ def parse_priority(priority):
"comments",
"created_at",
"custom_fields",
"deadline",
"description",
"estimate",
"external_id",
Expand Down
2 changes: 2 additions & 0 deletions pivotal-import/pivotal_import_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,7 @@ def test_build_release():
d = {
"story_type": "release",
"name": "A Release",
"deadline": "2014-10-15T00:00:00",
}

assert {
Expand All @@ -405,6 +406,7 @@ def test_build_release():
{"name": PIVOTAL_TO_SHORTCUT_RUN_LABEL},
{"name": PIVOTAL_RELEASE_TYPE_LABEL},
],
"deadline": "2014-10-15T00:00:00",
},
"parsed_row": d,
} == build_entity(ctx, d)
Expand Down
Loading