Commit Graph

208 Commits

Author SHA1 Message Date
Cyril Roelandt
11e04748b9 Allow empty messages in comments.
Some bug trackers, like Launchpad, allow messages to be empty (when adding a
file to the bug, for instance).
2018-12-26 23:23:07 +01:00
Michael Muré
96f514168f
repo: minor cleaning 2018-12-25 16:35:37 +01:00
Michael Muré
94b28b68e5
termui: display an explicit placeholder for empty messages 2018-12-23 21:46:47 +01:00
Michael Muré
0d5bd6b18a
graphql: now that it's possible, split the schema for clarity 2018-12-23 17:55:41 +01:00
Michael Muré
1410a1af75
upgrade gqlgen to v0.7.1 2018-12-23 17:11:37 +01:00
Rafael Ascensão
8dcd3d21cd tests: configure user ident in repos used by tests
Some git operations require the user to have an identity configured and
will exit with failure if none is set (or if git can't guess it). As a
direct consequence of this, the test suite may fail depending on the
user local configuration.

The error itself is justified as regular users *should* configure their
identity themselves. However, when building in chrooted environments
it's unlikely the git identity will be set making the test suite fail
unnecessarily.

To prevent such unnecessary failures, let's make a dummy identity for
repos created and used by the test suite.
2018-12-10 22:14:27 +00:00
Michael Muré
82701f8ce7
bug: add a new SetMetadataOperation to retroactively tag operations 2018-10-21 00:55:58 +02:00
Michael Muré
7cb7994cda
github: also pull users email 2018-10-07 18:27:23 +02:00
Michael Muré
8ec1dd0926
github: working incremental + comment history for the first comment 2018-10-01 23:34:45 +02:00
Michael Muré
f18c2d2783
bug: make sure to invalidate the hash when changing an op's metadata 2018-10-01 23:33:25 +02:00
Michael Muré
0fe7958aba
bug: message can be empty on edit comment 2018-10-01 23:32:52 +02:00
Michael Muré
6ea6f3614e
bug: in op convenience function, return the new op to be able to set metadata later 2018-10-01 23:31:16 +02:00
Michael Muré
f026f61aaa
bug: custom error for the different error case when loading a bug 2018-10-01 23:27:34 +02:00
Michael Muré
de81ed49e6
bug: add a new no-op operation to store arbitrary metadata on a bug 2018-10-01 21:58:50 +02:00
Michael Muré
a4b218adec
add documentation 2018-10-01 21:47:12 +02:00
Michael Muré
97d9494853
bug: add a test for operations hash 2018-10-01 21:44:42 +02:00
Michael Muré
bda9b01b5a
bug: add a test for OpBase metadata 2018-10-01 11:37:37 +02:00
Michael Muré
3402230a55
bug: use a value embedding for OpBase 2018-10-01 11:37:17 +02:00
Michael Muré
7f86898ef9
bug: use deditated type for all TimelineItem 2018-09-30 17:15:54 +02:00
Michael Muré
037f5bf50b
timeline: various minor improvements 2018-09-30 11:03:42 +02:00
Michael Muré
d450c7a883
use more testify, fix unchecked errors 2018-09-29 21:09:09 +02:00
Michael Muré
c46d01f8c1
bug: implement comment edition
- add a new operation
- add a new "timeline" in the snapshot that hold a processed version of the operations
2018-09-29 20:41:19 +02:00
Michael Muré
41e61a67b6
bug: apply an operation with a pointer to the snapshot 2018-09-29 11:28:18 +02:00
Michael Muré
794d014fae
bug: define a hash-based identifier for an operation 2018-09-29 00:51:54 +02:00
Michael Muré
1bf268cebc
merge package operations into bug, they are tightly coupled anyway 2018-09-29 00:51:54 +02:00
Michael Muré
40c6e64e4b
cache: add raw edit functions to allow setting up the author, the timestamp and the metadatas 2018-09-25 17:56:58 +02:00
Michael Muré
5d7c3a76af
bug: add the optional field AvatarUrl to Person 2018-09-25 17:55:20 +02:00
Michael Muré
a72ea453a9
bug: add the ability to store arbitrary metadata on an operation 2018-09-24 20:19:16 +02:00
Michael Muré
82eaceffc1
repo: split the Repo interface to avoid abstraction leak in RepoCache 2018-09-21 18:53:37 +02:00
Michael Muré
d57e2fdd19
commands: fix a panic on merge invalid 2018-09-19 21:45:52 +02:00
Michael Muré
1060acfd53
bug: reclassify some merge error as "invalid" instead of hard error 2018-09-19 21:45:52 +02:00
Michael Muré
8455567900
bug: readBug returns better errors 2018-09-18 23:36:22 +02:00
Michael Muré
0d5998eb67
commands: add a package to handle implicit bug selection 2018-09-18 12:49:16 +02:00
Michael Muré
6f5d433e33
docs & cleaning 2018-09-16 13:50:53 +02:00
Michael Muré
bfb5e96aab
commands: git bug comment now show the comments of a bug 2018-09-15 20:30:31 +02:00
Michael Muré
7bec0b1f13
bug: add a data validation process to avoid merging incorrect operations 2018-09-15 13:15:00 +02:00
Michael Muré
fb0f5530f1
catch a lot of error not being checked 2018-09-13 12:43:47 +02:00
Michael Muré
19f43a83c3
bug: proper int baked enum for merge result status instead of a string 2018-09-13 11:13:51 +02:00
Michael Muré
60fcfcdcb0
bug: change the OperationPack serialization format for Json
See https://github.com/MichaelMure/git-bug/issues/5 for the details of this choice
2018-09-12 16:57:46 +02:00
Michael Muré
3605887345 reorganize package for a more idomatic go 2018-09-11 22:14:46 +02:00
Michael Muré
2dcd06d1e7
bug: ensure that OpBase field are public and properly serialized
fix #37
2018-09-10 19:09:20 +02:00
Michael Muré
30d4bc2121
fix english grammar 2018-09-09 20:17:12 +02:00
Michael Muré
13797c3b77
person: add a function to test the matching of a query 2018-09-09 20:14:52 +02:00
Michael Muré
877f3bc21e
status: add a function to parse a status 2018-09-09 20:13:46 +02:00
Michael Muré
6d7e79a277
cache: refactor to handle bug changes during Pull 2018-09-08 14:17:08 +02:00
Michael Muré
61a1173ec3
bug: refactor the Pull code to have the message formating in the upper layers 2018-09-07 17:10:40 +02:00
Michael Muré
d17cd003ed
bug: also update the operations incrementaly in the snapshot
fix #39
2018-09-04 20:06:26 +02:00
Michael Muré
e2a0d178cf
bug: make sure the lamport values are set properly after a commit 2018-09-03 21:39:10 +02:00
Michael Muré
6ff02ed842
add some documentation 2018-09-02 15:37:28 +02:00
Michael Muré
7397c94d99
make CLI commands use the cache to lock the repo properly 2018-08-31 17:22:10 +02:00
Michael Muré
e7648996c8
bug: add a new BugExerpt that hold a subset of a bug state for efficient sorting and retrieval 2018-08-23 19:19:16 +02:00
Michael Muré
16f55e3f4d
bug: introduce WithSnapshot to maintain incrementally and effitiently a snapshot 2018-08-23 19:15:50 +02:00
Michael Muré
08127d8d1c
bug: add benchmarcks for bug merge 2018-08-19 20:40:50 +02:00
Michael Muré
b58812136e
bug: remove use of the too recent %(refname:lstrip=-1) of git
fix #24
2018-08-19 13:58:55 +02:00
Michael Muré
a474093774
bug: add "was" on SetTitleOperation to store what the title was 2018-08-15 22:01:45 +02:00
Michael Muré
4c850b5989
cleanup go imports 2018-08-13 18:39:19 +02:00
Michael Muré
df144e727a
fix some linting trouble 2018-08-13 15:28:47 +02:00
Michael Muré
e2f4b027c9
termui: implement push/pull 2018-08-12 21:09:30 +02:00
Michael Muré
a0d509bcdd
termui: display status and label changes in show bug 2018-08-09 15:28:32 +02:00
Michael Muré
5675299c8d
termui: commit the bug when quiting the show bug window 2018-08-09 14:45:02 +02:00
Michael Muré
28670ff8de
doc: complete the model doc now that the code is more stable 2018-08-07 14:57:12 +02:00
Michael Muré
435be2b693
bug: add a Lamport logical clock to be able to sort bugs by creation time and edit time without having to rely on a timestamp 2018-08-06 20:31:20 +02:00
Michael Muré
90fb85e067
bug: store the referenced media in their own git tree under /media, as per the doc I wrote myself 2018-08-05 15:26:36 +02:00
Michael Muré
d88d59e9c5
fix test 2018-08-02 23:45:40 +02:00
Michael Muré
d8f89726fe
implement media hosting in git for comments + API for the webui 2018-08-02 23:37:49 +02:00
Michael Muré
9488467c75
termui: show the last edit in a dedicated column 2018-08-02 16:48:07 +02:00
Michael Muré
e5a6a71b78
graphql: implement the missing mutations 2018-08-01 21:57:12 +02:00
Michael Muré
c875d40e63
termui: add a view to display a bug 2018-08-01 02:17:06 +02:00
Michael Muré
eb39c5c29b
cli: rework new and comment command to better use the editor
a nice templace is now provided with explanations

new: title and message can now be provided from the editor. Title will
be the first non-empty line
2018-07-31 16:44:23 +02:00
Michael Muré
c58aa18a2d
graphql: lazy loading for the bug relay connection 2018-07-29 20:58:22 +02:00
Michael Muré
08f03ecf3c
graphql: fix marshaling of label 2018-07-29 20:56:03 +02:00
Michael Muré
ff2fd14e3f
wip gqlgen 2018-07-27 19:48:45 +02:00
Michael Muré
6706fa2beb
some cleaning 2018-07-25 21:27:50 +02:00
Michael Muré
6a12373965
more refactoring to have reusable bug action across different UI 2018-07-25 18:01:32 +02:00
Michael Muré
cbdba92704
bug: fix merge procedure 2018-07-25 17:59:40 +02:00
Michael Muré
a28f325a43
fix remote refs pattern to match default git behavior 2018-07-25 17:58:54 +02:00
Michael Muré
17e2ec8f56
bug: refactor to limit abstraction leak and to have a more reusable code for the UIs 2018-07-23 00:04:46 +02:00
Quentin Gliech
1dd5118eeb graphql: Actually get the bugs from the repo 2018-07-20 14:32:23 +02:00
Michael Muré
59e6ae872c
NewBug can no longer error 2018-07-19 18:34:25 +02:00
Michael Muré
0a7814f33a
humanize time 2018-07-19 18:10:45 +02:00
Michael Muré
9f04fc2f7b
bug: replace the uuid based id with the hash of the first commit 2018-07-19 17:58:15 +02:00
Michael Muré
7f5922f905
rework all the commands to use cobra as a parser 2018-07-19 12:36:01 +02:00
Michael Muré
cfa11372cb
implement label op+command 2018-07-18 16:41:09 +02:00
Michael Muré
ba3281dc99
all operations now have an author and a timestamp 2018-07-18 00:16:06 +02:00
Michael Muré
43bf0063f2
crude implementation of show 2018-07-17 20:51:09 +02:00
Michael Muré
1332a6ec0a
ls: add some colors 2018-07-17 20:23:14 +02:00
Michael Muré
76ac1787b8
add bug status + open/close commands 2018-07-17 19:28:37 +02:00
Michael Muré
0180b68cb0
implement pull/merge 2018-07-17 01:52:56 +02:00
Michael Muré
d3893a5e04
rework the commands thing and add a "commands" command to list all commands 2018-07-16 15:21:21 +02:00
Michael Muré
cbff4b8aba
add a way to load a bug from a prefix 2018-07-15 09:25:29 +02:00
Michael Muré
1e4562e999
ls: better output 2018-07-15 01:43:20 +02:00
Michael Muré
54b41c604b
cleaning 2018-07-14 23:03:43 +02:00
Michael Muré
13d7b3480b
use a Unix timestamp (int64) for the time instead of golang's Time that cause trouble for serialisation 2018-07-14 23:02:49 +02:00
Michael Muré
fd4fa96c19
bug: use a 40 char truncated sha256 hash as ID, 8 char for human reading 2018-07-14 22:48:54 +02:00
Michael Muré
d973718567
add time to comments 2018-07-14 22:18:40 +02:00
Michael Muré
da470993d1
complete the storage/read process + tests (!) 2018-07-14 22:17:37 +02:00
Michael Muré
499669c144
each commit reference the very first set of ops (will be useful for fast access to lamport clock and ordering) 2018-07-14 06:42:13 +02:00
Michael Muré
55aef8c387
implement AddComment 2018-07-13 22:53:53 +02:00
Michael Muré
35d64e4f9e
fix push/pull 2018-07-13 21:51:27 +02:00
Michael Muré
1779a0f3b9
serialize a Bug to git as a blob+tree+commit+ref 2018-07-13 21:21:24 +02:00
Michael Muré
deff9e0a41
add basic tests for Bug and OperationIterator 2018-07-13 16:48:55 +02:00
Michael Muré
078545538e
add a bug's operation iterator 2018-07-13 16:14:00 +02:00
Michael Muré
bc12fee58e
create the Bug structure 2018-07-13 16:13:40 +02:00
Michael Muré
e02294c8f3
add the first 2 operations 2018-07-12 21:32:11 +02:00
Michael Muré
3aecdf2c2d
create the Snapshot type for a compiled bug operation log 2018-07-12 21:32:10 +02:00
Michael Muré
3087a472bf
move Hash in /util/ 2018-07-12 21:32:10 +02:00
Michael Muré
cda8114fda
store user info in the datastore 2018-07-12 21:32:09 +02:00
Michael Muré
c498674718
add the new bug command with a very primitive bug datastructure 2018-07-12 12:44:46 +02:00