Skip to content

Commit

Permalink
address code review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tejal29 committed Jun 25, 2021
1 parent f777ff7 commit fb71380
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 31 deletions.
55 changes: 41 additions & 14 deletions config/examples/skaffold.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,15 @@ collections:
This board is used by Skaffold team to plan upcoming releases.
The timeline and priority of issues listed here are subject to change.
Please add label planning/Q3-21 for an issue to appear on this board.
display: planning
overflow: 3
rules:
- performance
- event-api-v2
- onboarding
- extensibility
- partner-requests
- skaffold-v2
- docs
- all-other-requests

- id: similar
Expand Down Expand Up @@ -699,32 +702,56 @@ rules:
- state: closed
- updated: -21d
## Planing
performance:
name: "Perfomance issues"
onboarding:
name: >
Simple Onboarding, Faster dev.
Use Label - area/onboarding
type: issue
filters:
- label: "planning/Q3-21"
- label: "area/onboarding"

extensibility:
name: >
Extensibility - Deploy and Lifecyle.
Use Label area/extensibility
type: issue
filters:
- label: "planning/Q2-21"
- label: "area/performance"
- label: "planning/Q3-21"
- label: "area/extensibility"

event-api-v2:
name: "Output/ Event API v2"
skaffold-v2:
name: >
Skaffold V2 pipeline.
Use Label area/V2
type: issue
filters:
- label: "planning/Q2-21"
- label: "area/api_v2"
- label: "planning/Q3-21"
- label: "area/extensibility"

partner-requests:
name: "Other partner requests"
name: >
Other partner requests.
Use Label source/partnerships
type: issue
filters:
- label: "planning/Q2-21"
- label: "planning/Q3-21"
- label: "source/partnerships"

docs:
name: >
Skaffold Docs.
Use label area/docs
type: issue
filters:
- label: "planning/Q3-21"
- label: "area/docs"

all-other-requests:
name: "Others"
type: issue
filters:
- label: "planning/Q2-21"
- label: "planning/Q3-21"

# Fix-It
fixit-prs:
Expand Down
2 changes: 1 addition & 1 deletion pkg/site/kanban.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ type Swimlane struct {
User *provider.User
Name string
Description string
Url string
URL string
Columns []*triage.RuleResult
Issues int
}
Expand Down
39 changes: 25 additions & 14 deletions pkg/site/planning.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,30 @@ import (
)

const (
unplanned = "Not Planned"
unplanned = "Unplanned"
inProgress = "In Progress"
)

// Planning shows a view of a collection.
// Planning board can be used planning Sprints and futures releases
// categorized in swimlanes defining a feature or Objective.
// The planning board gives a view of all planned milestones with issues
// versus the current or selected milestone in the Kanban Board.
// It also highlights all new incoming issues not assigned to a milestone.

func (h *Handlers) Planning() http.HandlerFunc {
fmap := template.FuncMap{
"toJS": toJS,
"toYAML": toYAML,
"toJSfunc": toJSfunc,
"toDays": toDays,
"HumanDuration": humanDuration,
"UnixNano": unixNano,
"getAssignees": getAssignees,
"getMilestone": getMilestone,
"Avatar": avatarSticky,
"Class": className,
"toJS": toJS,
"toYAML": toYAML,
"toJSfunc": toJSfunc,
"toDays": toDays,
"HumanDuration": humanDuration,
"UnixNano": unixNano,
"getAssignees": getAssignees,
"getMilestone": getMilestone,
"unAssignedOrAvatar": unAssignedOrAvatar,
"Class": className,
"isUnplanned": isUnplanned,
}

t := template.Must(template.New("planning").Funcs(fmap).ParseFiles(
Expand Down Expand Up @@ -86,9 +93,9 @@ func getMilestone(c *hubbub.Conversation) string {
return fmt.Sprintf("Milestone: %s", *c.Milestone.Title)
}

func avatarSticky(u *provider.User) template.HTML {
func unAssignedOrAvatar(u *provider.User) template.HTML {
if u.GetLogin() == unassigned {
return `<div class="sticky-reaction">🤷</div>`
return `🤷`
}
return avatar(u)
}
Expand Down Expand Up @@ -134,7 +141,7 @@ func groupByState(results []*triage.RuleResult) []*Swimlane {
Description: fmt.Sprintf("Due on %s (%d/%d) open",
co.Milestone.GetDueOn().Format("2020-01-02"), co.Milestone.GetOpenIssues(),
co.Milestone.GetOpenIssues()+co.Milestone.GetClosedIssues()),
Url: *co.Milestone.HTMLURL,
URL: *co.Milestone.HTMLURL,
Columns: make([]*triage.RuleResult, len(results)),
}
}
Expand All @@ -159,3 +166,7 @@ func groupByState(results []*triage.RuleResult) []*Swimlane {
}
return append(sl, lanes[inProgress])
}

func isUnplanned(name string) bool {
return name == unplanned
}
4 changes: 2 additions & 2 deletions site/planning.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
{{ $col := .Collection }}

{{ range .Swimlanes }}
<tr class="swimlane {{ if eq .Name "Not Planned" }}unassigned-lane{{ end }}">
<tr class="swimlane {{ if .Name | isUnplanned }}unassigned-lane{{ end }}">
<td class="kanban-assignee"><a href={{.Url}}>{{ .Name }}</a><div>{{ .Description }}</div></td>
{{ range .Columns }}
<td class="kanban-column row">
Expand All @@ -87,7 +87,7 @@
<a href="{{ $i.URL }}" title="@{{ $i.LastCommentAuthor.GetLogin }}: {{ $i.LastCommentBody }}">
<span class="sticky-id">{{ if gt $repoCount 1 }}{{ $i.Project }}{{ end }}#{{ $i.ID }}</span>
<span class="sticky-title">{{ $i.Title }}</span>
<span class="sticky-text"><br/>{{ range $i | getAssignees }}{{ . | Avatar}}{{ end }}</span>
<span class="sticky-text"><br/>{{ range $i | getAssignees }}{{ . | unAssignedOrAvatar }}{{ end }}</span>
<span class="sticky-text"><br/>{{ $i | getMilestone }} </span>
</a>

Expand Down

0 comments on commit fb71380

Please sign in to comment.