Closed luciidlou closed 10 months ago
@oknozor in the spirit of full disclosure @luciidlou and I coworkers and the private repo he's referencing is one of ours.
@luciidlou I 100% spoke incorrectly when I was explaining and said that the default behavior of the bot was to ignore merge commits - that was the default behavior prior to the recently PR that replaced conventional_commit_parser
with cocogitto
directly. The default cocogitto
configuration is to not ignore merge commits and if there is no cog.toml
in the target repo, the bot will now use the default for Settings
.
@oknozor should I put up another PR to change the bot's config creation to something like:
// Parse the config file into Cocogitto `Settings` (falling
// back to the default if the target repo doesn't have a `cog.toml`)
let cog_config = Settings::try_from(cog_file).unwrap_or_else(|_| Settings {
ignore_merge_commits: true,
..Settings::default()
});
??
@oknozor Actually... this might be an issue too. That should probably be either the repo-specific "main", the branch the PR is being merged into, or the branch that's being merged from. Not actually sure which without some more thought...
@oknozor PR is up
I was able to verify proper parsing behavior of committed cog.toml
files as well, so I think that should fix the actual code issue(s)? I'm gonna have to lean on your expertise for whether or not anything else might be amiss to cause the observed behavior.
There's no chance it's something like "existing repos need to re-auth the bot to get the updated version" or something, is there?
@oknozor Bump
@luciidlou The fix PR for this looks to be merged. Would you be so kind as to verify that it now works as expected?
@oknozor Hey there! The PR @the-wondersmith linked above looks like it was merged, but we are still seeing the same issue today (see screenshot). Do we need to remove and re-add cocogitto-bot to any existing repos in order for the changes to take place? Or is there some central deployment that needs updating? Or does the PR that was merged simply just not solve the problem?
Hey, I am not home right now and I don't have access to the cluster where the bot is deployed. I will check the deployment next week.
@oknozor bump
@oknozor bumping again
Hey, this should be working, can you close/reopen your pull request. I am not able to reproduce this behavior (see: https://github.com/cocogitto/cocogitto_bot_playground/pull/18).
If this is still an issue can you provide a simple reproducer on a public repository ?
Describe the bug The cocogitto bot is not ignoring commit messages that follow the
Merge branch 'main' into <some-branch-name>
pattern. This is typically the commit message pattern that gets automatically produced when using GitHub'sUpdate Branch
button in the UI.To Reproduce Steps to reproduce the behavior:
main
.main
with a change.Update Branch
on your PR in the GItHub UI (this syncs your working branch withmain
).Expected behavior The bot is expected to ignore the commit message described above.
Additional context The repo does have a
cog.toml
with theignore_merge_commits = true
configured. I've also attached some screenshots to add further context. The repo is private, so it cannot be linked.