Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 5, 2026

  • Create GitHub Actions workflow to check for schema updates
  • Configure workflow to run on schedule (twice daily at 6:00 AM and 6:00 PM UTC)
  • Add logic to download upstream schema file
  • Compare with local schema file
  • Create PR if changes are detected
  • Test the workflow manually (validated syntax and logic)
  • Request code review
  • Address code review feedback (simplified URL, removed redundant error check)
  • Run final security check (no vulnerabilities found)
  • Update peter-evans/create-pull-request from v7 to v8
  • Address bot code review feedback:
    • Add concurrency control to prevent multiple simultaneous runs
    • Change fetch-depth to 1 for efficiency (shallow clone)
    • Add proper error handling for curl command
    • Add error handling for missing local file
    • Simplify diff command by removing unnecessary redirect
  • Fix quote consistency for GITHUB_OUTPUT variable
Original prompt

This section details on the original issue you should resolve

<issue_title>[Feature]: Add Workflow to update /lib/efcpt-config.schema.json from ErikEJ/EFCorePowerTools</issue_title>
<issue_description>### Problem Statement

We keep a copy of the EFCPT efcpt-config.json Schema in our project's /lib folder. This has the ability to drift if the upstream EFCorePowerTools repo ever changes.

Proposed Solution

Create a workflow that runs periodically (once or twice a day) that checks if https://raw.githubusercontent.com/ErikEJ/EFCorePowerTools/refs/heads/master/samples/efcpt-config.schema.json has diverged from /lib/efcpt-config.schema.json. If it has, a PR is opened with the content of the new schema file against main.

Alternatives Considered

No response

Usage Examples

Priority

Nice to have

Contribution

  • I'm willing to submit a PR for this feature

Additional Context

No response</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits January 5, 2026 20:35
Co-authored-by: JerrettDavis <2610199+JerrettDavis@users.noreply.github.com>
Co-authored-by: JerrettDavis <2610199+JerrettDavis@users.noreply.github.com>
@JerrettDavis JerrettDavis marked this pull request as ready for review January 5, 2026 20:37
Copilot AI changed the title [WIP] Add workflow to update efcpt-config.schema.json Add scheduled workflow to sync efcpt-config.schema.json from upstream Jan 5, 2026
@JerrettDavis JerrettDavis requested a review from Copilot January 5, 2026 20:37
Copilot AI requested a review from JerrettDavis January 5, 2026 20:38
@JerrettDavis
Copy link
Owner

@copilot peter-evans/create-pull-request is on v8 now.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds an automated workflow to keep the local EFCPT schema file synchronized with the upstream EFCorePowerTools repository, preventing drift between the two versions.

  • Introduces a scheduled GitHub Actions workflow that runs twice daily (6 AM and 6 PM UTC)
  • Downloads and compares the upstream schema file with the local copy
  • Automatically creates a pull request when differences are detected

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: JerrettDavis <2610199+JerrettDavis@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 5, 2026

@copilot peter-evans/create-pull-request is on v8 now.

Updated to v8 in commit ff9271b.

@JerrettDavis
Copy link
Owner

@copilot review and resolve the valid code review comments.

Copilot AI and others added 2 commits January 5, 2026 20:53
Co-authored-by: JerrettDavis <2610199+JerrettDavis@users.noreply.github.com>
Co-authored-by: JerrettDavis <2610199+JerrettDavis@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 5, 2026

@copilot review and resolve the valid code review comments.

Addressed all valid code review comments in commits aa75fe8 and 4d1fbcc:

Changes made:

  • Added concurrency control to prevent multiple simultaneous runs
  • Changed fetch-depth to 1 for efficiency (shallow clone)
  • Added proper error handling for curl command failures
  • Added handling for missing local schema file with automatic creation
  • Simplified diff command by removing unnecessary redirect
  • Fixed quote consistency for GITHUB_OUTPUT variable

Security scan completed with no vulnerabilities.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 5, 2026

Code Coverage

Summary
  Generated on: 01/05/2026 - 21:14:28
  Coverage date: 01/05/2026 - 21:14:25
  Parser: Cobertura
  Assemblies: 1
  Classes: 81
  Files: 52
  Line coverage: 83.6%
  Covered lines: 3975
  Uncovered lines: 775
  Coverable lines: 4750
  Total lines: 8615
  Branch coverage: 67.6% (1629 of 2408)
  Covered branches: 1629
  Total branches: 2408
  Method coverage: 94% (701 of 745)
  Full method coverage: 81.4% (607 of 745)
  Covered methods: 701
  Fully covered methods: 607
  Total methods: 745

JD.Efcpt.Build.Tasks                                                                                                                                             83.6%
  JD.Efcpt.Build.Tasks.AddSqlFileWarnings                                                                                                                        92.7%
  JD.Efcpt.Build.Tasks.ApplyConfigOverrides                                                                                                                       100%
  JD.Efcpt.Build.Tasks.BuildLog                                                                                                                                  66.6%
  JD.Efcpt.Build.Tasks.Chains.ConnectionStringResolutionChain                                                                                                    90.1%
  JD.Efcpt.Build.Tasks.Chains.ConnectionStringResolutionContext                                                                                                   100%
  JD.Efcpt.Build.Tasks.Chains.DirectoryResolutionChain                                                                                                           91.6%
  JD.Efcpt.Build.Tasks.Chains.DirectoryResolutionContext                                                                                                          100%
  JD.Efcpt.Build.Tasks.Chains.FileResolutionChain                                                                                                                 100%
  JD.Efcpt.Build.Tasks.Chains.FileResolutionContext                                                                                                               100%
  JD.Efcpt.Build.Tasks.Chains.ResourceResolutionChain                                                                                                            93.1%
  JD.Efcpt.Build.Tasks.Chains.ResourceResolutionContext                                                                                                           100%
  JD.Efcpt.Build.Tasks.CheckSdkVersion                                                                                                                           41.1%
  JD.Efcpt.Build.Tasks.ComputeFingerprint                                                                                                                        97.8%
  JD.Efcpt.Build.Tasks.Config.CodeGenerationOverrides                                                                                                             100%
  JD.Efcpt.Build.Tasks.Config.EfcptConfigOverrideApplicator                                                                                                      93.1%
  JD.Efcpt.Build.Tasks.Config.EfcptConfigOverrides                                                                                                                100%
  JD.Efcpt.Build.Tasks.Config.FileLayoutOverrides                                                                                                                 100%
  JD.Efcpt.Build.Tasks.Config.NamesOverrides                                                                                                                      100%
  JD.Efcpt.Build.Tasks.Config.ReplacementsOverrides                                                                                                               100%
  JD.Efcpt.Build.Tasks.Config.TypeMappingsOverrides                                                                                                               100%
  JD.Efcpt.Build.Tasks.ConnectionStrings.AppConfigConnectionStringParser                                                                                          100%
  JD.Efcpt.Build.Tasks.ConnectionStrings.AppSettingsConnectionStringParser                                                                                        100%
  JD.Efcpt.Build.Tasks.ConnectionStrings.ConfigurationFileTypeValidator                                                                                           100%
  JD.Efcpt.Build.Tasks.ConnectionStrings.ConnectionStringResult                                                                                                   100%
  JD.Efcpt.Build.Tasks.DacpacFingerprint                                                                                                                         96.1%
  JD.Efcpt.Build.Tasks.DbContextNameGenerator                                                                                                                    83.4%
  JD.Efcpt.Build.Tasks.Decorators.TaskExecutionContext                                                                                                             50%
  JD.Efcpt.Build.Tasks.Decorators.TaskExecutionDecorator                                                                                                          100%
  JD.Efcpt.Build.Tasks.DetectSqlProject                                                                                                                             0%
  JD.Efcpt.Build.Tasks.EnsureDacpacBuilt                                                                                                                         96.1%
  JD.Efcpt.Build.Tasks.Extensions.DataRowExtensions                                                                                                               100%
  JD.Efcpt.Build.Tasks.Extensions.EnumerableExtensions                                                                                                            100%
  JD.Efcpt.Build.Tasks.Extensions.StringExtensions                                                                                                                100%
  JD.Efcpt.Build.Tasks.FileHash                                                                                                                                   100%
  JD.Efcpt.Build.Tasks.FileSystemHelpers                                                                                                                          100%
  JD.Efcpt.Build.Tasks.MessageLevelHelpers                                                                                                                        100%
  JD.Efcpt.Build.Tasks.ModuleInitializer                                                                                                                          100%
  JD.Efcpt.Build.Tasks.MsBuildPropertyHelpers                                                                                                                     100%
  JD.Efcpt.Build.Tasks.NullBuildLog                                                                                                                              88.8%
  JD.Efcpt.Build.Tasks.PathUtils                                                                                                                                 91.6%
  JD.Efcpt.Build.Tasks.ProcessResult                                                                                                                              100%
  JD.Efcpt.Build.Tasks.ProcessRunner                                                                                                                               90%
  JD.Efcpt.Build.Tasks.QuerySchemaMetadata                                                                                                                       91.3%
  JD.Efcpt.Build.Tasks.RenameGeneratedFiles                                                                                                                       100%
  JD.Efcpt.Build.Tasks.ResolveDbContextName                                                                                                                       100%
  JD.Efcpt.Build.Tasks.ResolveSqlProjAndInputs                                                                                                                   87.9%
  JD.Efcpt.Build.Tasks.RunEfcpt                                                                                                                                  60.6%
  JD.Efcpt.Build.Tasks.RunSqlPackage                                                                                                                             16.3%
  JD.Efcpt.Build.Tasks.Schema.ColumnModel                                                                                                                         100%
  JD.Efcpt.Build.Tasks.Schema.ColumnNameMapping                                                                                                                   100%
  JD.Efcpt.Build.Tasks.Schema.ConstraintModel                                                                                                                     100%
  JD.Efcpt.Build.Tasks.Schema.DatabaseProviderFactory                                                                                                            94.1%
  JD.Efcpt.Build.Tasks.Schema.ForeignKeyColumnModel                                                                                                               100%
  JD.Efcpt.Build.Tasks.Schema.ForeignKeyModel                                                                                                                      90%
  JD.Efcpt.Build.Tasks.Schema.IndexColumnModel                                                                                                                    100%
  JD.Efcpt.Build.Tasks.Schema.IndexModel                                                                                                                         92.8%
  JD.Efcpt.Build.Tasks.Schema.Providers.FirebirdSchemaReader                                                                                                     98.6%
  JD.Efcpt.Build.Tasks.Schema.Providers.MySqlSchemaReader                                                                                                         100%
  JD.Efcpt.Build.Tasks.Schema.Providers.OracleSchemaReader                                                                                                        100%
  JD.Efcpt.Build.Tasks.Schema.Providers.PostgreSqlSchemaReader                                                                                                    100%
  JD.Efcpt.Build.Tasks.Schema.Providers.SqliteSchemaReader                                                                                                        100%
  JD.Efcpt.Build.Tasks.Schema.Providers.SqlServerSchemaReader                                                                                                     100%
  JD.Efcpt.Build.Tasks.Schema.SchemaFingerprinter                                                                                                                 100%
  JD.Efcpt.Build.Tasks.Schema.SchemaModel                                                                                                                         100%
  JD.Efcpt.Build.Tasks.Schema.SchemaReaderBase                                                                                                                    100%
  JD.Efcpt.Build.Tasks.Schema.TableModel                                                                                                                         92.8%
  JD.Efcpt.Build.Tasks.SerializeConfigProperties                                                                                                                  100%
  JD.Efcpt.Build.Tasks.SqlProjectDetector                                                                                                                        93.3%
  JD.Efcpt.Build.Tasks.StageEfcptInputs                                                                                                                          95.7%
  JD.Efcpt.Build.Tasks.Strategies.CommandNormalizationStrategy                                                                                                   94.1%
  JD.Efcpt.Build.Tasks.Strategies.ProcessCommand                                                                                                                  100%
  JD.Efcpt.Build.Tasks.Utilities.DotNetToolUtilities                                                                                                             66.6%
  System.Text.RegularExpressions.Generated                                                                                                                       80.3%
  System.Text.RegularExpressions.Generated.<RegexGenerator_g>F9F9425F6F5E055E5C6489D8E6FA46DE135B3C69D9A15B4CBA235D8D2417FD2EC__AssemblySymbolsMetadataRegex_1   86.2%
  System.Text.RegularExpressions.Generated.<RegexGenerator_g>F9F9425F6F5E055E5C6489D8E6FA46DE135B3C69D9A15B4CBA235D8D2417FD2EC__DatabaseKeywordRegex_4           75.7%
  System.Text.RegularExpressions.Generated.<RegexGenerator_g>F9F9425F6F5E055E5C6489D8E6FA46DE135B3C69D9A15B4CBA235D8D2417FD2EC__DataSourceKeywordRegex_6         72.3%
  System.Text.RegularExpressions.Generated.<RegexGenerator_g>F9F9425F6F5E055E5C6489D8E6FA46DE135B3C69D9A15B4CBA235D8D2417FD2EC__FileNameMetadataRegex_0          86.2%
  System.Text.RegularExpressions.Generated.<RegexGenerator_g>F9F9425F6F5E055E5C6489D8E6FA46DE135B3C69D9A15B4CBA235D8D2417FD2EC__InitialCatalogKeywordRegex_5     71.2%
  System.Text.RegularExpressions.Generated.<RegexGenerator_g>F9F9425F6F5E055E5C6489D8E6FA46DE135B3C69D9A15B4CBA235D8D2417FD2EC__NonLetterRegex_2                  100%
  System.Text.RegularExpressions.Generated.<RegexGenerator_g>F9F9425F6F5E055E5C6489D8E6FA46DE135B3C69D9A15B4CBA235D8D2417FD2EC__SolutionProjectLineRegex_7       82.5%
  System.Text.RegularExpressions.Generated.<RegexGenerator_g>F9F9425F6F5E055E5C6489D8E6FA46DE135B3C69D9A15B4CBA235D8D2417FD2EC__TrailingDigitsRegex_3            95.2%

@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.01%. Comparing base (ec3f185) to head (4d1fbcc).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #62      +/-   ##
==========================================
+ Coverage   79.39%   87.01%   +7.61%     
==========================================
  Files          51       51              
  Lines        3373     3373              
  Branches      459      396      -63     
==========================================
+ Hits         2678     2935     +257     
+ Misses        510      438      -72     
+ Partials      185        0     -185     
Flag Coverage Δ
unittests 87.01% <ø> (+7.61%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@JerrettDavis JerrettDavis merged commit d0194be into main Jan 5, 2026
7 checks passed
@JerrettDavis JerrettDavis deleted the copilot/add-workflow-update-schema branch January 5, 2026 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Add Workflow to update /lib/efcpt-config.schema.json from ErikEJ/EFCorePowerTools

3 participants