Age | Commit message (Collapse) | Author |
|
|
|
|
|
The TimeTask form now requires U.S. localisation for the time. This
means that decimal values are no longer submitted as "4,5" for four and
a half hours. Instead, it must be written "4.5".
|
|
The TimeTask form now requires U.S. instead of European date
localisation. This swaps the date and month fields so that the month
appears first.
|
|
|
|
The previous error message wasn't useful for determining the cause of
the error. It just said there was a problem, but provided no additional
information.
Append the HTTP response body from TimeTask to the error message so
users can see what they had a problem with.
|
|
* Increment version number
* Update CHANGELOG
* Change `VERSION` variable in main.go to a constant because this makes
more sense
|
|
|
|
|
|
|
|
Avoids having to download the completion file manually from the repo.
|
|
|
|
Make it more obvious which release version the archive contains.
|
|
|
|
|
|
|
|
Makes it faster to use the program by completing project names.
|
|
Compiles and compresses builds for a number of different platforms,
placing them all in a dist/ directory for release.
|
|
|
|
Realised that I forgot to explain this flag. Show an example of it usage
and output, and describe some of the reasoning behind why it's there.
|
|
As we've completed all the tasks we've defined, we can remove this file
for now. It no longer shows upcoming things that we have to do.
|
|
|
|
|
|
"Open" sounded a bit ambiguous to me.
|
|
The wording seemed a bit confusing before. Change it to make it clear
that you're supposed to add a new "projects" block to the config.
|
|
I personally think this tool "vastly improves" upon the Chrome
extension. After all, it's much more flexible, and it lives in the
console, both of which are immense pluses.
|
|
Split the example code onto multiple lines to improve readability.
|
|
I thought it would be cool if we showed off an example connecting
`timetasker` with another shell command.
|
|
Makes it a bit easier to read as text.
|
|
Installation instructions.
|
|
Explain the program's configuration and how to configure it using data
from TimeTask.
|
|
Show some examples of how to use the program.
|
|
Remove references to the project being abandoned. Briefly describe it.
|
|
|
|
|
|
Take the errors in `main()` that check the response body contents for
known error strings and put them in their respective functions in
"timetask/http.go".
Didn't really make sense to me that these functions were returning HTTP
responses that we weren't really using in a meaningful way. Instead they
should just do their thing and let us know if there was a problem.
That includes checking to see if there were any non-standard errors,
like the ones we had custom-built. Now all that handling and
error-making is self-contained, which feels much nicer.
|
|
|
|
|
|
Parse the module XML with `ModuleParseXML()`. Take the resulting
`[]Module` slice and use it to generate a string of the following
format:
ID Module
55555 R&D
77777 Sprint 1
222222 Sprint 2
This string is what gets printed to the console, which makes it rather
easy to read the modules that are available for the given project and
grab the appropriate ID to put into your config file.
|
|
Prefix the function name to make it more obvious what it relates to.
Since this function lives in the `timetask` module and will be used in
contexts that have nothing to do with Modules.
|
|
A new function that parses the XML returned by the `RequestModules()`
function.
It provides a `Module` type that allows us to interact with modules more
easily in code.
The `ParseXML()` function will take an XML string and return a slice of
`Module`s.
Added a test just to facilitate development. Wasn't able to find an easy
way to compare slices in Go, so just printed the values and checked the
result visually. Not a useful test for future use, but it served its
purpose. Eventually it would be nice to find a way to compare structs
and have a real pass/fail condition.
|
|
`Login()` now returns 3 values. Update the test.
|
|
Sprints will change with time while the other IDs of a project will stay
the same. Thus sprints, which live in the `Module` field, must be
updated regularly.
In order to facilitate that updating, instead of requiring users to get
those IDs directly from the TimeTask website every time, have them use
this command to get the names of sprints and their IDs. They can then
update the ID manually in their config file.
This code makes a request to the endpoint that returns module IDs for
the site (the site queries this via AJAX to update its interface).
The result of the request is some XML containing the modules and their
IDs. For now I'm just printing this out. We'll want to parse the XML and
display it in a nicer way.
|
|
|
|
|
|
|
|
Add some simple error handling for known responses from our TimeTask
HTTP requests. Check a couple of known strings to determine whether
there was an error. If so, exit with a failing error code.
Remove our old `log` statements. These were used during debugging to see
some output and check responses from TimeTask. We now have an idea of
what those responses are, and are handling some of the error cases. Thus
the log statements are no longer needed.
|
|
|
|
Remove the initial cap on Kingpin error messages for consistency in our
messages.
|
|
|