aboutsummaryrefslogtreecommitdiff
path: root/ticket (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fix the ticket tui so it does not panicMichael Gattozzi2020-01-051-24/+38
| | | | | | | | | | | | | | The tui for ticket uses indexing in order to have quicker unchecked access into data structures for the data needed that gets displayed in the tui. However, you can't index empty data. We add a check for this in places that expect data to exist so that nothing will cause a panic. We also add fixes to handle the fact that you can't divide by zero in our index modifying logic when pressing the left/right/up/down arrow keys. With this the tui shouldn't panic anymore and can work in an empty state. Closes: 4c37e800-2e38-11ea-b6e0-32f54a3ad7cd 'Having no tickets causes the TUI to crash'
* Create a panic handler for ticket tuiMichael Gattozzi2020-01-051-0/+28
| | | | | | | | | | In ticket 9b344c00-2e3d-11ea-bc2d-b4e1317c6ecc 'Create a panic handler for ticket tui' it became clear that ticket needed it's own way to handle panics since crashing the tui without cleaning up after itself leaves the terminal in a completely garbled state. This commit now has the tui clean up properly after itself then run the normal hook which means it panics like any other Rust program and can get a backtrace with the panic as usual with RUST_BACKTRACE=1
* Fix init logic for `ds init`Michael Gattozzi2020-01-021-0/+1
| | | | | | | Since the interface for `hooked init` changed to also make a language choice we need to allow the user to select the language when doing `ds init`. We also have ticket print out it ran successfully on initialization now. This was an oversight from an earlier refactor.
* Change ticket tui to fix thread panic on WindowsMichael Gattozzi2020-01-011-6/+17
| | | | | | | | One of the issues experienced on Windows with the tui for ticket was that the thread handling events was panicking on close, but this was only happening on Windows. For some reason it must not have been closing down the spawned thread properly. To get around this we set up another channel to send a message to close the thread down and avoid the panic.
* Add the ability to assign users to ticketsMichael Gattozzi2019-12-232-6/+91
|
* Upgrade tui to allow commenting from itMichael Gattozzi2019-12-203-89/+217
| | | | | | | | | This is a fairly large overhaul of ticket but lays down the last bit of groundwork needed before an initial release. It handles input to write comments, refactors the code a bit to be cleaner and less computation heavy, and also adds instructions on the bottom for how to use the tui. This should be enough for people to start using it, though obviously there's more work to go, but it feels more usable than before.
* Switch from termion to crossterm for tuiMichael Gattozzi2019-12-192-84/+54
|
* Refactor ticket to use common methodsMichael Gattozzi2019-12-132-129/+78
| | | | | | | While this had already been done with `src/actions.rs` before not everything had been updated and new commands had been added since then to the cli tool. This commit fixes things up quite a bit and simplifies some of the code as a result.
* Add the ability to add comments to ticketsMichael Gattozzi2019-12-134-32/+107
| | | | | | | | | | | | | | | | | | This commit encompasses quite a few changes to add tickets: - The `Ticket` struct is updated to properly order comments using a uuid v1 and to hold the user name, uuid, and their comment - Tickets in the repo are updated to accomodate this change to the ticket. Despite this being a breaking config change, none of these tickets had any comments so it was an easy manual port and the migration tool did not need to be updated. - The TUI was updated to display the tickets a bit better with some coloring and now also showing the comments with them This gets us one step closer to a decent first release for ticket. The only things that are really left to do are adding the ability to comment in the tui, listing tickets on the cli, and adding in issue assignees on both the cli and tui.
* License all code under GPL-3.0Michael Gattozzi2019-12-101-0/+1
|
* Make the pre-commit script pedantic and fix errorsMichael Gattozzi2019-12-103-29/+51
| | | | | | | | This commit really ups the level and quality of the Rust code by setting clippy to pedantic mode. It also fixes an issue where bash continued to run scripts even if something failed with a non-zero exit status. We also deny all warnings so as to actually fail the builds and the commit hooks. This should make sure code quality stays at a high level.
* Upgrade ticket format from V0 to V1 to use UUIDsMichael Gattozzi2019-12-034-87/+192
| | | | | | | | | | | | | | | | | | | | | This is a necessary upgrade to deal with the fact that incremental ids do not work in distributed systems. For instance say we have two branches from the same commit on master and they both add a new ticket. Both will have the same incremental ID despite being completely separate tickets. In this case we want to use UUIDs, specifically version 1 as defined in IETF RFC 4122. This version of UUID uses a timestamp to generate it and as a result the UUID it generates is *sortable*. This means that the UUIDs can be created whenever on any branch, be unique, and will be sortable by time. No matter when or where our tickets can be sorted correctly by this UUID in a deterministic order. Since we are also upgrading the code we've set up migration upgrade code to handle this in case we need to do this again in the future. We also add a few more fields and make some breaking changes since we already are for the UUIDs. Resources: - https://tools.ietf.org/html/rfc4122
* Add a tui for ticketMichael Gattozzi2019-12-024-16/+401
| | | | | | | | This commit sets up a basic tui for the current functionality. It's traversable by keyboard and by mouse and shows the ticket state via tab, info in a row, and the description in it's own box when selected. This is necessary for a good user experience for in repo tools. Files are fine, but interactivity is better.
* Add logging output to ticketMichael Gattozzi2019-11-262-3/+46
| | | | | | | | ticket used to just run without any kind of logging for commands that weren't just printing tickets to the console or getting any kind of information as to what was going on. This change adds logging with info level for the end user by default, with debug and trace statements while developing the code being an option via the RUST_LOG env var.
* Fix formatting and add checks to pre-commit hookMichael Gattozzi2019-11-221-4/+19
| | | | | | | | | This enables a pre-commit script and adding more pedantic checks to the commit. This means from now on all commits will be in a working state in the history and this enables us to build directly on master without worrying about it breaking the build. Where we're going we won't need feature branches anymore. This also fixes formatting issues that existed but the GitHub actions would not be able to catch at all.
* Move find_root function into the new shared crateMichael Gattozzi2019-11-212-58/+14
| | | | | | | | | | This cleans up the init function using the modified find_root function for ticket and moves it into a new shared crate so that other tools that might be built can use it. This means we can easily find the root of a git repo no matter where in the repo one is and build paths relative to it. Closes #3
* Change ticket/Cargo.toml to use non * versionsMichael Gattozzi2019-11-181-5/+5
|
* Add ticket functionality to dev-suite (#3)Michael Gattozzi2019-11-183-6/+228
| | | | | | | This adds the ability to open new tickets, close them, and show them from the commandline. This functionality is enough to get started adding more tickets to the repo from here on out and work on new tools with tickets associated with them.
* Initialize the dev-suite repoMichael Gattozzi2019-11-153-0/+34
This commit initializes the repo with a stubbed out ticket tool and the rustfmt preferences for the repo. The idea is that dev-suite will allow remote collaboration by giving a lot of the functionality that GitHub and other services have, but have all of the data live alongside the repo and it's history. This makes choosing a different service easier and lets people who don't want to use the service have that option.