fix issue fetching all issues for a repo rather than milestone

This commit is contained in:
Radek Stepan 2014-09-19 20:12:12 -07:00
parent 3504d29514
commit 4f2bf6ef36
8 changed files with 22 additions and 10 deletions

View File

@ -16,7 +16,6 @@ GitHub Burndown Chart as a service. Public repos are free, for private access au
### The 20%
- [ ] calculate left margin based on the total number of points text width
- [ ] work for `mbostock/d3`
- [ ] Do not show login/logged-in state when we are still fetching that information from Firebase
- [ ] Handle 404 on routes; from catch all check if '/' or go 404 controller
- [ ] Variable document.title on different pages
@ -24,6 +23,7 @@ GitHub Burndown Chart as a service. Public repos are free, for private access au
- [ ] Check that we have not run out of requests to make
- [ ] Show loading sign on top of [browser window](https://github.com/buunguyen/topbar) which is unobtrusive enough we can show it immediately.
- [ ] show a countdown clock towards the end of the milestone or show overdue
- [x] work for `mbostock/d3`
- [x] allow people to go straight to a URL that fetches the repo, if public, for them; to demo our app without adding a repo (add it behind the scenes); *req* cache repos
- [x] closed issues can be moved to a newly created milestone, this messes up the chart since we assume milestone is created first!
@ -56,6 +56,11 @@ GitHub Burndown Chart as a service. Public repos are free, for private access au
- [ ] allow people to submit suggestions via GitHub Issues
- [ ] find a way where, as a group, we can share repo data by trusting the other repo members that use our platform
- [ ] support Jira & Gitlab
- [ ] when fetching subsequent updates, fetch only the last page of issues since some repos are large (2.5MB & 19 pages for `mbostock/d3`); actually that is for all issues, not milestone constrained. So only an issue if we want to see a burnchart for all the issues for a repo
- [ ] move tests from `radekstepan/github-burndown-chart`
- [ ] if all issue circles are close to each other, make a "master circle" that amalgamates all the issues into one large circle, makes for a prettier view
- [ ] tell people if they have no due date
- [ ] make better x-axis date display, otherwise we see all 1s.
## Notes
@ -67,6 +72,7 @@ GitHub Burndown Chart as a service. Public repos are free, for private access au
- workers: using a free instance of IronWorker and assuming 5s runtime each time gives us a poll every 6 minutes. Zapier would poll every 15 minutes but already integrates Stripe and FB.
- worst case scenario I provide even Small Business plan for free and provide a better experience
- $2.5 Node.js PaaS via Gandi with promo code `PAASLAUNCH-C50E-B077-A317`.
- let people vote on features they want to see fast: [tally.tl](http://tally.tl/).
## Plans

View File

@ -471,7 +471,7 @@ ul li{display:inline-block}
#head ul li{margin-left:30px}
#head a{color:#e0808d;font-weight:bold;}
#head a.active,#head a:hover{color:#fff}
#head .right{float:right;margin-right:20px;line-height:64px;}
#head .right{float:right;margin-right:20px;line-height:64px;color:#e0808d;}
#head .right a{-webkit-border-radius:2px;border-radius:2px;background:#ffbb2a;color:#c1041c;padding:11px 20px}
#title{border-bottom:3px solid #f3f4f8;}
#title h2{border-bottom:3px solid #aaafbf;margin:30px 0 -3px 0;display:inline-block;padding-bottom:20px}

View File

@ -64,7 +64,7 @@ ul li{display:inline-block}
#head ul li{margin-left:30px}
#head a{color:#e0808d;font-weight:bold;}
#head a.active,#head a:hover{color:#fff}
#head .right{float:right;margin-right:20px;line-height:64px;}
#head .right{float:right;margin-right:20px;line-height:64px;color:#e0808d;}
#head .right a{-webkit-border-radius:2px;border-radius:2px;background:#ffbb2a;color:#c1041c;padding:11px 20px}
#title{border-bottom:3px solid #f3f4f8;}
#title h2{border-bottom:3px solid #aaafbf;margin:30px 0 -3px 0;display:inline-block;padding-bottom:20px}

View File

@ -40042,7 +40042,7 @@ if (typeof exports === 'object') {
"datetime": /^(\d{4}-\d{2}-\d{2})T(.*)/,
"size_label": /^size (\d+)$/,
"location": /^#!((\/[^\/]+){2,3})$/,
"points": 'LABELS'
"points": 'ONE_SIZE'
}
}
});
@ -40391,6 +40391,7 @@ if (typeof exports === 'object') {
results = [];
return (fetch_page = function(page) {
return request.allIssues(opts, {
'milestone': opts.milestone.number,
state: state,
page: page
}, function(err, data) {
@ -40414,7 +40415,7 @@ if (typeof exports === 'object') {
var filtered, total;
total = 0;
switch (config.get('chart.points')) {
case 'ALL_ONE_SIZE':
case 'ONE_SIZE':
total = collection.length;
filtered = _.map(collection, function(issue) {
issue.size = 1;

View File

@ -76,7 +76,7 @@
"datetime": /^(\d{4}-\d{2}-\d{2})T(.*)/,
"size_label": /^size (\d+)$/,
"location": /^#!((\/[^\/]+){2,3})$/,
"points": 'LABELS'
"points": 'ONE_SIZE'
}
}
});
@ -425,6 +425,7 @@
results = [];
return (fetch_page = function(page) {
return request.allIssues(opts, {
'milestone': opts.milestone.number,
state: state,
page: page
}, function(err, data) {
@ -448,7 +449,7 @@
var filtered, total;
total = 0;
switch (config.get('chart.points')) {
case 'ALL_ONE_SIZE':
case 'ONE_SIZE':
total = collection.length;
filtered = _.map(collection, function(issue) {
issue.size = 1;

View File

@ -30,4 +30,4 @@ module.exports = new Model
# How do we specify which user/repo/(milestone) we want?
"location": /^#!((\/[^\/]+){2,3})$/
# Process all issues as one size or use labels.
"points": 'LABELS'
"points": 'ONE_SIZE'

View File

@ -12,7 +12,10 @@ module.exports =
results = []
# One pageful fetch (next pages in series).
do fetch_page = (page = 1) ->
request.allIssues opts, { state, page }, (err, data) ->
request.allIssues opts, {
'milestone': opts.milestone.number,
state, page
}, (err, data) ->
# Errors?
return cb err if err
# Empty?
@ -38,7 +41,7 @@ module.exports =
# Which point counting mode are we in?
switch config.get 'chart.points'
# All issues are the same size
when 'ALL_ONE_SIZE'
when 'ONE_SIZE'
total = collection.length
filtered = _.map collection, (issue) ->
issue.size = 1

View File

@ -94,6 +94,7 @@ ul
float: right
margin-right: 20px
line-height: 64px
color: #E0808D
a
border-radius: 2px