Merge lp://staging/~chad.smith/lp2kanban/branch-to-card into lp://staging/~launchpad/lp2kanban/trunk

Proposed by Chad Smith
Status: Superseded
Proposed branch: lp://staging/~chad.smith/lp2kanban/branch-to-card
Merge into: lp://staging/~launchpad/lp2kanban/trunk
Diff against target: 964 lines (+460/-83)
14 files modified
.bzrignore (+1/-0)
Makefile (+2/-2)
README.landscape (+17/-0)
bootstrap.py (+66/-42)
buildout.cfg (+2/-2)
configs/groups.ini (+16/-0)
configs/sync.ini (+106/-0)
create_creds.py (+1/-1)
jenkins.sh (+32/-0)
run.sh (+21/-0)
src/lp2kanban/bugs2cards.py (+57/-10)
src/lp2kanban/kanban.py (+78/-16)
src/lp2kanban/tests/common.py (+5/-2)
src/lp2kanban/tests/test_bugs2cards.py (+56/-8)
To merge this branch: bzr merge lp://staging/~chad.smith/lp2kanban/branch-to-card
Reviewer Review Type Date Requested Status
Данило Шеган (community) Needs Resubmitting
Landscape Pending
Review via email: mp+280669@code.staging.launchpad.net

Description of the change

Add initial support for branch cards and taskboards. This branch only handles syncing and moving branch "MP/blue" cards on the Landscape 2016 board.

 Support was added for branch cards inside bugs2card because a lot of the logic is common and can hopefully be consolidated in a subsequent branch.

There will be a followup branch with added logic in bugs2cards to call moveToTaskBoard for feature cards that are manually dragged to the "$Group::Landed" lane.

src/lp2kanban/kanban.py:
- Define initial LeankitTaskBoard class
- Add optional CurrentTaskBoardId property to LeankitCard
- Add LeankitCard.moveToTaskBoard method to move a card as a subtask of another card
- Since Taskboard API calls live on a different route, rework API routes defined on the LeankitConnector class

src/lp2kanban/bugs2cards.py:
- _get_mp_info to handle non-bug branch records when parsing linked MPs
- should_sync_card to return true if external_system_url is a branch
- get_card_status returns proper status for cards that have external_system_urls linked but no bugs (external_system_id) linked
- add a loop to sync_board function which processes all "branch cards" through board.getCardsWithExternalLinks(only_branches=True)

config/sync.ini:
  - comment out [Landscape Cisco] board definition (as that should live in this board now

To test:
buildout
./bin/test
# to test against landscape 201
./create_creds.py (this will create your creds to modify the shared 2016 board)
Select "Change anything" button in your browser to allow updating cards

./bin/py src/lp2kanban/bugs2cards.py -c configs/sync.ini -b 'Landscape 2016'

# Tweak branches or drag cards at https://canonical.leankit.com/Boards/View/102392996#workflow-view that you want to see automatically moved back to the proper lanes.

What's lacking:
 unit tests to cover bugs2card sync_board (coming in a followup branch)

To post a comment you must log in.
Revision history for this message
Данило Шеган (danilo) wrote :

Please re-submit this against lp:~landscape/lp2kanban/landscape-deploy.

review: Needs Resubmitting
Revision history for this message
Данило Шеган (danilo) wrote :

Note that I've also split out configs now since it was too easy to leak credentials (a bzr push in the lp2kanban namespace creates a public branch). Please review my drop-configs branch.

The kanban-sync job has been updated to use the new credentials (I've updated the password as well).

135. By Chad Smith

simplify moveToTaskBoard card method

136. By Chad Smith

merge ~landscape/lp2kanban/landscape-deploy to drop configs

137. By Chad Smith

address review comments: approved branches that have not yet been merged will remain in the status LANDING. update copyright.

138. By Chad Smith

fix has_branch conditional to first check if card.external_system_url is not None before trying to match BRANCH_REGEX

139. By Chad Smith

card.save needs to be taskboard aware. When calling UpdateCard the parent_board.id needs to be specified, not the taskboard.id

140. By Chad Smith

add parent_card param to LeankitTaskBoard so that we have a refernce to the taskboard's card on the parent_board. Use the parent_card for card path printing

141. By Chad Smith

merge landscape-deploy to get latest changes to jenkins.sh

142. By Chad Smith

revert test makefile change

Unmerged revisions

142. By Chad Smith

revert test makefile change

141. By Chad Smith

merge landscape-deploy to get latest changes to jenkins.sh

140. By Chad Smith

add parent_card param to LeankitTaskBoard so that we have a refernce to the taskboard's card on the parent_board. Use the parent_card for card path printing

139. By Chad Smith

card.save needs to be taskboard aware. When calling UpdateCard the parent_board.id needs to be specified, not the taskboard.id

138. By Chad Smith

fix has_branch conditional to first check if card.external_system_url is not None before trying to match BRANCH_REGEX

137. By Chad Smith

address review comments: approved branches that have not yet been merged will remain in the status LANDING. update copyright.

136. By Chad Smith

merge ~landscape/lp2kanban/landscape-deploy to drop configs

135. By Chad Smith

simplify moveToTaskBoard card method

134. By Chad Smith

process cards with linked branches in bugs2cards since a lot of the logic is common

133. By Chad Smith

landing_lanes == Dev::::Landed for config

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches