fc1c79620c
refactor: rename name to forge_name for consistency
2024-04-23 06:53:34 +01:00
8b56a185d3
refactor: rename name to repo_alias for consistency
2024-04-23 06:50:52 +01:00
32d54cfc1c
refactor: rename config variables,etc as repo_config
2024-04-21 19:36:37 +01:00
ee8b1e9fce
fix(config): deserialise gitdir as PathBuf, but expose it as GitDir
2024-04-21 19:33:42 +01:00
b71aece8c9
feat: add gitdir to RepoDetails type
2024-04-21 18:50:30 +01:00
a024c3de5e
feat: use GitDir in place of raw PathBuf
2024-04-21 18:47:07 +01:00
56e253b545
feat(config): add GitDir type
2024-04-21 18:38:47 +01:00
e10561f853
refactor(server/config): move tests into their own file
2024-04-21 18:24:14 +01:00
18143c17fd
refactor: use 'repo_path' use consistently
2024-04-20 21:03:17 +01:00
1170510c44
refactor: use 'server_repo_config' consistently
2024-04-20 21:03:12 +01:00
91870055b0
feat(gitforge): Add ability to clone a repo
...
Closes kemitix/git-next#56
2024-04-19 19:31:25 +01:00
16dc823f58
feat(config): User must specify a directory to store data
...
Closes kemitix/git-next#55
2024-04-19 18:49:03 +01:00
704853017b
feat(config): User can specify git directory to use for a repo
...
Closes kemitix/git-next#53
Does not include using this information.
2024-04-19 18:38:21 +01:00
50a969ede6
refactor: move server config loading out of forgejo module
...
Delete empty modules left over
2024-04-18 20:40:28 +01:00
0bfa1df875
refactor: delete dead code
2024-04-18 19:19:10 +01:00
0d57ee7bc0
refactor(gitforge): migrate some types from forge
2024-04-18 19:18:27 +01:00
adb44d18c9
feat(server/gitforge): replace git abstraction
2024-04-18 08:22:55 +01:00
ec9571a182
feat(repo/webhook): Replace webhook if it already exists
...
Closes kemitix/git-next#45
2024-04-15 22:47:54 +01:00
64a6b84ee4
feat(server/webhook): only accept authorised messages
...
Closes kemitix/git-next#47
2024-04-14 19:14:44 +01:00
b398ac3fd3
feat(repo/status): reschedule ValidateRepo when checks are Pending
...
Closes kemitix/git-next#48
2024-04-14 19:14:44 +01:00
24cb485410
feat(repo/webhook): Handle messages received via webhook for ForgeJo
...
Closes kemitix/git-next#43
2024-04-14 19:14:38 +01:00
dd91aa4f69
feat(server/webhook): implement register webhook
...
Closes kemitix/git-next#15
2024-04-14 14:37:55 +01:00
e7060800eb
feat(server/webhook): implement unregister webhook
...
Closes kemitix/git-next#17
2024-04-13 21:01:35 +01:00
df2d9d684c
feat(server/webhook): add webhook server
...
Closes kemitix/git-next#18
2024-04-13 20:23:24 +01:00
4c4ac4df25
fix(repo/branch): revalidate positions in more conditions
...
- when next has no commits
- when couldn't reset next to a commit (e.g. commit was WIP)
2024-04-13 16:23:02 +01:00
0622e6092b
feat(repo/branch): update next branch when not based on main
...
Closes kemitix/git-next#41
2024-04-13 15:26:45 +01:00
2055421067
refactor(repo/branch): extract get_commit_histories
2024-04-13 15:22:23 +01:00
069b313fc3
feat(config)!: Add webhook URL field to server config
2024-04-13 14:09:57 +01:00
b21b80881e
chore(config): Rename type RepoName
as RepoAlias
...
Closes kemitix/git-next#39
2024-04-13 14:09:57 +01:00
0105631e3a
feat(config): Allow repo config to be specified in server config
...
Closes kemitix/git-next#28
2024-04-13 14:09:57 +01:00
229d47f7c7
docs(server/config): add docs to types
2024-04-13 14:09:57 +01:00
e272ca296b
fix(actor/repo): always reschedule to validate repos
...
If validate repos saw anything unexpected it would stop and not schedule a re-validation.
2024-04-13 07:05:40 +01:00
af221f8a2f
fix(forge/mock): visibility on methods
2024-04-13 06:56:11 +01:00
3bbe9abbd9
test: Create stub mock forge
...
Still need to figure out what tests this will need to support, and how
to configure it's behaviour. I've not ruled out creating a forge object
that is passed in rather than the functions we have now.
Closes kemitix/git-next#37
2024-04-12 22:43:19 +01:00
1ffa8366e0
feat: isolate ForgeJo behind default feature 'forgejo'
2024-04-12 20:53:55 +01:00
9df732ce97
chore: reduce logging to debug
2024-04-12 19:46:52 +01:00
223dd426c6
chore: don't log success
2024-04-12 19:43:21 +01:00
ee9cc53540
fix: don't log url containing API token
2024-04-12 19:41:47 +01:00
5fcf16ea75
feat: Abstract Git command execution into injectable enum
...
Closes kemitix/git-next#36
2024-04-12 19:39:24 +01:00
fb74879309
chore(foregejo): don't log fetch url
...
It contained the api token
2024-04-12 19:21:27 +01:00
8c4ad4b534
chore: clean up some logging
2024-04-12 17:41:09 +01:00
4e6a306a72
feat: Don't advance next branch if the target commit message is invalid
...
Closes kemitix/git-next#33
2024-04-12 17:31:55 +01:00
cedaf16acf
feat: wrap API Token in a secrect::Secret and avoid logging
...
Closes kemitix/git-next#30
2024-04-12 15:27:03 +01:00
e8d174ee84
fix(forgejo): treat a blank status check result as pending
...
Closes kemitix/git-next#29
2024-04-12 13:51:56 +01:00
869935dfc2
fix(server): Prevent losing a task waker
...
Closes kemitix/git-next#26
2024-04-12 13:00:40 +01:00
3735afb2f8
fix: don't reload config when updating next branch
...
The StartRepo handler loads the config before then sending the
ValidateRepo message. However, we already have the config, so reloading
it isn't needed.
Added todo markers on sleep and dispatching of ValidateRepo where it is
used as a stop-gap until we have working webhook integration.
Add todo markers for checking valid commit messages before advancing
next branch.
2024-04-12 10:14:32 +01:00
0b427f1d4c
fix: avoid using terrors::OneOf across an await boundary
...
OneOf appears to not be Send
2024-04-12 10:14:32 +01:00
8ed942a501
fix: remove extra StartRepo message
...
Closes kemitix/git-next#32
2024-04-12 08:41:24 +01:00
c9d52a5b7f
feat: when no action to take, wait 10 seconds then restart
...
As a stop-gap until we have a working webhook server, this will poll the
repo for updates to it's status.
Closes kemitix/git-next#22
2024-04-11 18:30:52 +01:00
bb4d171174
fix: restore lost sleep
2024-04-11 18:19:47 +01:00