74 lines
1.6 KiB
Markdown
74 lines
1.6 KiB
Markdown
# TODO : Fixes and ideas for the future
|
|
|
|
## Add developper profile in a global config file
|
|
|
|
In `~/.config/git-timecost` :
|
|
|
|
```
|
|
---
|
|
profiles:
|
|
- name: Glenn Y. Rolland
|
|
emails:
|
|
- glenux@glenux.net
|
|
- glenux@gmail.com
|
|
times:
|
|
tz: Europe/Paris
|
|
- weekday: monday
|
|
begin: 09
|
|
end: 18
|
|
costs:
|
|
base: 70
|
|
overtime: 140
|
|
|
|
- name: Prabin Karki
|
|
emails:
|
|
- pkarki@gmail.com
|
|
hours:
|
|
tz: Asia/Kathmandu
|
|
begin: 9
|
|
end: 18
|
|
costs:
|
|
base: 20
|
|
overtime: 30
|
|
```
|
|
|
|
Then display:
|
|
- total normal hours
|
|
- total overtime hours
|
|
- total cost :
|
|
$$ total\_cost = \sum_{person \in Profiles} \Big( \sum_{hour\_type \in \{normal, extra\}} \Big( spent\_time(hour\_type, person) * cost(hour\_type, person) \Big) \Big) $$
|
|
|
|
Then, depending on the person, chare
|
|
|
|
|
|
|
|
## Merge users
|
|
|
|
Set-up a config file, either global or per repository
|
|
With id => names associations, so we can merge
|
|
users who commit with various names/emails/etc
|
|
|
|
- name: "John Smith <john.smith@company.com>",
|
|
match:
|
|
- "John S. <john@example.com>",
|
|
- "John Smith <john.s@example.com>",
|
|
- "J. Smith <smith@example.com>"
|
|
- name: "Foo Bar <foobar@company.com>",
|
|
match:
|
|
- "Foo B. <foobar@example.com>"
|
|
- "Foo Bar <foobar@company.com>"
|
|
|
|
|
|
## Per user scotch
|
|
|
|
Different users have a different commit style & frequency.
|
|
We should be able to define a per-user scotch.
|
|
|
|
## Automatic scotch : Use median delay between consecutive commits, per user
|
|
|
|
def median(array)
|
|
sorted = array.sort
|
|
len = sorted.length
|
|
return (sorted[(len - 1) / 2] + sorted[len / 2]) / 2.0
|
|
end
|
|
|