Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 35 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,45 @@
version: 2

multi-ecosystem-groups:
infrastructure:
schedule:
interval: "weekly"
day: "wednesday"
open-pull-requests-limit: 25
commit-message:
prefix: "chore"
include: "scope"

updates:
- package-ecosystem: "nuget"
directory: "/"
schedule:
interval: "weekly"
day: "wednesday"
open-pull-requests-limit: 25
cooldown:
default-days: 7
commit-message:
prefix: "chore"
include: "scope"
groups:
dotnet:
dotnet-minor-patch:
update-types:
- "minor"
- "patch"
patterns:
- "*"
dotnet-major:
update-types:
- "major"
patterns:
- "*"
- "*"


- package-ecosystem: "github-actions"
directory: "/"
patterns:
- "*"
multi-ecosystem-group: "infrastructure"
cooldown:
default-days: 7
34 changes: 34 additions & 0 deletions .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Dependabot auto-merge

on:
pull_request_target:
types: [opened, synchronize, reopened]

permissions:
contents: write
pull-requests: write

jobs:
dependabot:
runs-on: ubuntu-latest
if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'LayeredCraft/structured-logging'
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@25dd0e34f4fe68f24cc83900b1fe3fe149efef98 # v3
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

- name: Approve PR
if: steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor'
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Enable auto-merge for Dependabot PRs
if: steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor'
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15 changes: 11 additions & 4 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,24 @@
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<!-- Microsoft.Extensions.* packages ship parallel stable and preview build lines.
Pin each per-TargetFramework with bounded ranges so Dependabot can raise
lower bounds without crossing into the next major/preview line. -->
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0' or '$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'netstandard2.1'">
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.3" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="[8.0.3, 9.0.0)" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.17" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="[9.0.17, 10.0.0)" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net10.0'">
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="10.0.9" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="[10.0.9, 11.0.0)" />
</ItemGroup>
<!-- Lower bound is a prerelease, which causes NuGet to consider prerelease
candidates for this package ID. Use a letter-led prerelease marker on
the exclusive upper bound so the range stays below all 12.0.0 previews
as well as 12.0.0 stable. -->
<ItemGroup Condition="'$(TargetFramework)' == 'net11.0'">
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="11.0.0-preview.5.26302.115" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="[11.0.0-preview.5.26302.115, 12.0.0-a)" />
</ItemGroup>
<ItemGroup Label="GitHub">
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="10.0.300" PrivateAssets="All" />
Expand Down
1 change: 1 addition & 0 deletions LayeredCraft.StructuredLogging.slnx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Solution>
<Folder Name="/git/">
<File Path=".github/dependabot.yml" />
<File Path=".github/workflows/dependabot-auto-merge.yml" />
<File Path=".github/workflows/pr-build.yaml" />
<File Path=".github/workflows/publish-preview.yaml" />
<File Path=".github/workflows/publish-release.yaml" />
Expand Down
Loading