Commit graph

37 commits

Author SHA1 Message Date
5ba5a126c3 fix(gitforge): use local repo or clone to allow git push
Some checks failed
ci/woodpecker/cron/cron-docker-builder Pipeline was successful
ci/woodpecker/cron/push-next Pipeline was successful
ci/woodpecker/cron/tag-created Pipeline was successful
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/push-next Pipeline failed
The `git push` command requires a git directory (bare at a minimum)
before it can work.
The git dir must also be up-to-date with the relevant references from
the remote, so
we do a `git fetch` before a `git push`.

Closes kemitix/git-next#51
2024-05-03 19:08:58 +01:00
0d57ee7bc0 refactor(gitforge): migrate some types from forge
All checks were successful
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
2024-04-18 19:18:27 +01:00
adb44d18c9 feat(server/gitforge): replace git abstraction
All checks were successful
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
2024-04-18 08:22:55 +01:00
dd91aa4f69 feat(server/webhook): implement register webhook
Some checks failed
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/push-next Pipeline failed
Closes kemitix/git-next#15
2024-04-14 14:37:55 +01:00
df2d9d684c feat(server/webhook): add webhook server
Some checks failed
ci/woodpecker/cron/push-next Pipeline was successful
ci/woodpecker/cron/tag-created Pipeline was successful
ci/woodpecker/cron/cron-docker-builder Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/push-next Pipeline failed
Closes kemitix/git-next#18
2024-04-13 20:23:24 +01:00
4c4ac4df25 fix(repo/branch): revalidate positions in more conditions
All checks were successful
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
- 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
All checks were successful
ci/woodpecker/push/push-next Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/cron-docker-builder Pipeline was successful
Closes kemitix/git-next#41
2024-04-13 15:26:45 +01:00
2055421067 refactor(repo/branch): extract get_commit_histories
All checks were successful
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
ci/woodpecker/push/cron-docker-builder Pipeline was successful
2024-04-13 15:22:23 +01:00
e272ca296b fix(actor/repo): always reschedule to validate repos
All checks were successful
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
ci/woodpecker/push/cron-docker-builder Pipeline was successful
If validate repos saw anything unexpected it would stop and not schedule a re-validation.
2024-04-13 07:05:40 +01:00
3bbe9abbd9 test: Create stub mock forge
All checks were successful
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
ci/woodpecker/cron/push-next Pipeline was successful
ci/woodpecker/cron/tag-created Pipeline was successful
ci/woodpecker/cron/cron-docker-builder Pipeline was successful
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'
All checks were successful
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
2024-04-12 20:53:55 +01:00
223dd426c6 chore: don't log success
All checks were successful
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
2024-04-12 19:43:21 +01:00
5fcf16ea75 feat: Abstract Git command execution into injectable enum
All checks were successful
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
Closes kemitix/git-next#36
2024-04-12 19:39:24 +01:00
8c4ad4b534 chore: clean up some logging
All checks were successful
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
2024-04-12 17:41:09 +01:00
4e6a306a72 feat: Don't advance next branch if the target commit message is invalid
All checks were successful
ci/woodpecker/push/push-next Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/cron-docker-builder Pipeline was successful
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
Some checks failed
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/push-next Pipeline failed
Closes kemitix/git-next#30
2024-04-12 15:27:03 +01:00
3735afb2f8 fix: don't reload config when updating next branch
All checks were successful
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
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
8ed942a501 fix: remove extra StartRepo message
Some checks failed
ci/woodpecker/tag/cron-docker-builder Pipeline was successful
ci/woodpecker/tag/push-next Pipeline was successful
ci/woodpecker/tag/tag-created Pipeline was successful
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/push-next Pipeline failed
Closes kemitix/git-next#32
2024-04-12 08:41:24 +01:00
bb4d171174 fix: restore lost sleep
All checks were successful
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
2024-04-11 18:19:47 +01:00
f7dc27f67e feat: git command output is suppressed
All checks were successful
ci/woodpecker/push/push-next Pipeline was successful
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
Closes kemitix/git-next#27
2024-04-11 18:19:47 +01:00
ec258bca97 refactor: rename ResetForce::Normal as None
Some checks failed
ci/woodpecker/push/push-next Pipeline failed
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/cron-docker-builder Pipeline failed
2024-04-11 18:09:57 +01:00
e0b15712c2 refactor: reuse branch::reset to advance next towards dev
All checks were successful
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
2024-04-11 18:05:26 +01:00
6bad8a27f7 refactor: reuse branch::reset to advance main branch to next
All checks were successful
ci/woodpecker/push/push-next Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/cron-docker-builder Pipeline was successful
2024-04-11 18:02:07 +01:00
ab58981f87 refactor: reuse branch::reset to advance main branch to next
All checks were successful
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
2024-04-11 17:45:11 +01:00
115b353389 feat: Force push next branch to main when it isn't a dev ancestor
All checks were successful
ci/woodpecker/push/push-next Pipeline was successful
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
Closes kemitix/git-next#21
2024-04-11 15:48:18 +01:00
ed1ab6faa5 feat: add branch::reset function
Some checks failed
ci/woodpecker/push/cron-docker-builder Pipeline failed
ci/woodpecker/push/tag-created Pipeline failed
ci/woodpecker/push/push-next Pipeline failed
2024-04-11 14:24:18 +01:00
1c9f7cb4ea fix: clean up instrumentation
All checks were successful
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
2024-04-11 07:46:30 +01:00
9469d27476 fix(server): Pause before checking CI status when just updated branch
All checks were successful
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
ci/woodpecker/cron/push-next Pipeline was successful
ci/woodpecker/cron/tag-created Pipeline was successful
ci/woodpecker/cron/cron-docker-builder Pipeline was successful
If we check the status of the commit as soon as we push we get a Pass before the CI tests have even started. Wait briefly (10 seconds) to allow the CI to start and set the status to pending.

Closes kemitix/git-next#24
2024-04-10 22:40:33 +01:00
50a56aadee fix(server): Doesn't properly detect when dev or next are ahead
All checks were successful
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
Closes kemitix/git-next#23
2024-04-10 20:51:40 +01:00
3a761b5b21 feat(server): Implement advancing main branch to the next commit
All checks were successful
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
Closes kemitix/git-next#19
2024-04-10 17:36:08 +01:00
98a94ea855 Implement advancing next branch to next commit on dev branch
All checks were successful
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
Uses gix to invoke git commands as there is not API to directly update
the position of a branch.

Closes kemitix/git-next#14
2024-04-10 15:54:50 +01:00
5c4b745c00 feat(server): add marker info logs for advance main and next
All checks were successful
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
2024-04-10 11:46:51 +01:00
7ed30fc382 feat(server): add stub for branch::advance_main
All checks were successful
ci/woodpecker/push/docker Pipeline was successful
ci/woodpecker/push/builder Pipeline was successful
ci/woodpecker/push/release Pipeline was successful
ci/woodpecker/push/todo-check Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
2024-04-10 06:55:55 +01:00
70e0f94042 feat(server): Assess next action for repo 2024-04-09 22:19:33 +01:00
3203bbd967 feat(server): validate branch head positions
All checks were successful
ci/woodpecker/push/docker Pipeline was successful
ci/woodpecker/push/release Pipeline was successful
ci/woodpecker/push/todo-check Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
2024-04-09 18:18:19 +01:00
9eb7660f7b feat(server/forgejo): fetch commit histories
All checks were successful
ci/woodpecker/push/docker Pipeline was successful
ci/woodpecker/push/release Pipeline was successful
ci/woodpecker/push/todo-check Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
2024-04-09 18:15:19 +01:00
bdea942bcb feat(server): create stub for validating branch positions
Some checks failed
ci/woodpecker/push/docker Pipeline was successful
ci/woodpecker/push/release Pipeline was successful
ci/woodpecker/push/todo-check Pipeline was successful
ci/woodpecker/push/build Pipeline failed
2024-04-09 15:31:59 +01:00