-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Include updated images in commit message #49
Conversation
Hi, thank you for the effort! I am a little bit confused about this design. Like moving it into the decoder. What is the benefit of this vs ranging over the actual changes reported by the krm filter? |
Dont worry about the ci failure. I put a failing test in main, on purpose. I will fix that one now, then you could rebase main to get this CI green. |
I have fixed the test a92a2d2 |
So, the solution you had in mind was to construct the commit message from the changes array that is returned from the |
8a10c11
to
62a4c4c
Compare
Oh, I see. The image(s) being sent to the decoder won't necessarily result in a change. |
62a4c4c
to
d5d5c6d
Compare
Yes, that is one thing. And another thing is that multiple events can could run as batch. So it may change serveral image refs, in your repo, at once. Depending on the debounce timer and so on. I did experiment with tracking changes in the past, doing file diffs and so on. But at the end a semantic diff is probably the best, in order to avoid false positives due to things like white space and indentation changes. So I found it most solid to have the filter track and report the changes it makes. |
@@ -43,8 +43,10 @@ func KoboldHandler(ctx context.Context, cache string, g model.TaskGroup, runner | |||
g.DestBranch.String = g.RepoUri.Ref | |||
g.DestBranch.Valid = true | |||
} | |||
|
|||
msg = "chore(kobold): update image refs" | |||
msg, err = GetCommitMessage(changes) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could make changes
a slice of structs with structured data so we don't have to use regex.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess here the type needs to be changed to some struct type:
Line 53 in a92a2d2
Changes []string |
you can run the checks locally Line 40 in a92a2d2
|
Yeah, I'm getting different errors and the linting seems to give up after them. It is not liking the |
Maybe I can make an Apple Silicon specific Makefile in a future PR. |
Go has build tags. Some of them are architecture specific. As a shortcut, if you suffix a file with an architecutre, it will be only build on that arch, like if you would have used a build tag. You could create a file called Like this one, but for darwin: https://github.com/bluebrown/kobold/blob/main/git/copy_linux.go |
Gotcha. I ended up renaming it to copy.go and adding |
Hi, thanks. Do you think its good now ? Should we maybe add a few tests? |
b928e22
to
97bb6af
Compare
Yeah, I think it is good now. I just added a couple tests. |
hi @tsmalls93 , thanks. I build and pushed the latest main as image: docker.io/bluebrown/kobold:aab019c Its not released yet but you can use that one already, if you want. |
Fixes #48