Skip to content

Conversation

devcrocod
Copy link
Contributor

Change the property name to search for GPG_SECRET_KEY

Motivation and Context

enable signing publications

Breaking Changes

no

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Copy link
Contributor

@Copilot 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

Updates the Gradle publishing script to look for a different environment variable when loading the GPG signing key.

  • Renames the expected environment/Gradle property key from GPG_SIGNING_KEY to GPG_SECRET_KEY.
  • Alters the configuration contract for supplying the signing key.

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +49 to 52
val gpgKeyName = "GPG_SECRET_KEY"
val gpgPassphraseName = "SIGNING_PASSPHRASE"
val signingKey = providers.environmentVariable(gpgKeyName)
.orElse(providers.gradleProperty(gpgKeyName))
Copy link
Preview

Copilot AI Sep 19, 2025

Choose a reason for hiding this comment

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

Changing the expected key from GPG_SIGNING_KEY to GPG_SECRET_KEY drops support for the previously recognized environment/Gradle property name and may break existing build environments despite the PR stating there are no breaking changes. Consider supporting both (preferring the new one) to preserve backward compatibility, e.g.: val gpgKeyNames = listOf("GPG_SECRET_KEY", "GPG_SIGNING_KEY"); val signingKey = gpgKeyNames.map { providers.environmentVariable(it).orElse(providers.gradleProperty(it)) }.reduce { acc, p -> acc.orElse(p) }. Or document the intentional breaking change.

Suggested change
val gpgKeyName = "GPG_SECRET_KEY"
val gpgPassphraseName = "SIGNING_PASSPHRASE"
val signingKey = providers.environmentVariable(gpgKeyName)
.orElse(providers.gradleProperty(gpgKeyName))
val gpgKeyNames = listOf("GPG_SECRET_KEY", "GPG_SIGNING_KEY")
val gpgPassphraseName = "SIGNING_PASSPHRASE"
val signingKey = gpgKeyNames
.map { providers.environmentVariable(it).orElse(providers.gradleProperty(it)) }
.reduce { acc, p -> acc.orElse(p) }

Copilot uses AI. Check for mistakes.

@devcrocod devcrocod merged commit e6afd10 into main Sep 19, 2025
4 checks passed
@devcrocod devcrocod deleted the devcrocod/change-key-name branch September 19, 2025 13:42
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.

2 participants