Skip to content
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

Dependabot config #1847

Merged
merged 2 commits into from
May 31, 2024
Merged

Dependabot config #1847

merged 2 commits into from
May 31, 2024

Conversation

soutaro
Copy link
Member

@soutaro soutaro commented May 30, 2024

Follow up #1833.

  • Limit open PR count to 3
  • Skip auto-merge if .gemspec is updated, because it's a change to next release
  • Skip auto-merge if Gemfile is updated, just to make it more conservative

@soutaro
Copy link
Member Author

soutaro commented May 30, 2024

@ParadoxV5 Any thought?

@soutaro
Copy link
Member Author

soutaro commented May 30, 2024

This doesn't work correctly yet...

@soutaro soutaro marked this pull request as draft May 30, 2024 04:38
Copy link
Contributor

@ParadoxV5 ParadoxV5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't work correctly yet...

Good intentions, at least 👍

@@ -4,15 +4,15 @@ updates:
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
open-pull-requests-limit: 3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Slow Mode 😄

@ParadoxV5
Copy link
Contributor

  • Skip auto-merge if .gemspec is updated, because it's a change to next release
  • Skip auto-merge if Gemfile is updated, just to make it more conservative

Looks like the Gemfile is also part of a release (only Gemfile.lock isn’t):

rbs/rbs.gemspec

Lines 28 to 34 in 6499a09

# Specify which files should be added to the gem when it is released.
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
`git ls-files -z`.split("\x0").reject do |f|
f.match(%r{^(test|spec|features|bin|steep|benchmark)/}) || f.match(/Gemfile\.lock/)
end
end

Although… Now I’m not sure if including Gemfile has a purpose?

Comment on lines 6 to 7
- '!Gemfile'
- '!steep/Gemfile'
Copy link
Contributor

@ParadoxV5 ParadoxV5 May 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this work?

Suggested change
- '!Gemfile'
- '!steep/Gemfile'
- '!**/Gemfile'

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The */Gemfile pattern would work, but the ! doesn't work.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, but the action didn't run with this PR. I expected to run it because this PR doesn't change none of the files in the ! pattern. So, I guess the negative (!) pattern doesn't work without positive pattern.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding **/* at the top of patterns?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah the if: section at the job section blocked running the job.

@soutaro
Copy link
Member Author

soutaro commented May 30, 2024

Although… Now I’m not sure if including Gemfile has a purpose?

Right. Will remove the Gemfile from the .gem package too.

Comment on lines 5 to 7
- '!rbs.gemspec'
- '!Gemfile'
- '!steep/Gemfile'
Copy link
Contributor

@ParadoxV5 ParadoxV5 May 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or rather…?

Suggested change
- '!rbs.gemspec'
- '!Gemfile'
- '!steep/Gemfile'
- '**/Gemfile.lock'

@ParadoxV5
Copy link
Contributor

BTW, leverage the path config you just learned so the CI don’t need to test everything for anything.

ParadoxV5 added a commit to ParadoxV5/template-ruby-gem that referenced this pull request May 30, 2024
Only enable the auto-merge automacitally, if only the lockfiles are updated.
We need review if `.gemspec` or `Gemfile` is updated.
@soutaro
Copy link
Member Author

soutaro commented May 31, 2024

Found that simply aborting the actions is sufficient. Give it a try!

@soutaro soutaro marked this pull request as ready for review May 31, 2024 03:21
@soutaro soutaro enabled auto-merge May 31, 2024 03:21
@soutaro soutaro added this pull request to the merge queue May 31, 2024
Merged via the queue into master with commit e62b52b May 31, 2024
18 checks passed
@soutaro soutaro deleted the dependabot-config branch May 31, 2024 03:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants