Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 5, 2025

The label com.azure.messaging.eventhubs.eventhubproducerclient.construct appeared twice in the README, causing validation failures. Additionally, the "Create an Event Hub producer using a connection string" section incorrectly showed credential-based authentication instead of a connection string example.

Changes

  • Removed duplicate label from line 120 (connection string section)
  • Label retained at line 156 (DefaultAzureCredential section) where it references the actual source code snippet
  • Added new code sample createProducerWithConnectionString() in EventHubsJavaDocCodeSamples.java with label com.azure.messaging.eventhubs.eventhubproducerclient.connectionstring
  • Updated README line 120 to reference the new connection string example, properly demonstrating how to create an EventHubProducerClient using a connection string

The connection string section now correctly shows connection string-based authentication, while the DefaultAzureCredential section shows credential-based authentication, ensuring each section accurately represents its intended authentication method.

Original prompt

This section details on the original issue you should resolve

<issue_title>[Java SDK][azure-messaging-eventhubs] Extra Label</issue_title>
<issue_description>1.
ErrorInfo: Extra label found: <xref
ErrorLink: https://learn.microsoft.com/en-us/java/api/com.azure.messaging.eventhubs.eventhubclientbuilder?view=azure-java-stable&branch=main
ErrorLocation:

  • Appears 1 times , label : <xref

</issue_description>

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


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Fix extra label issue in azure messaging eventhubs Fix duplicate code snippet label in azure-messaging-eventhubs README Nov 5, 2025
Copilot AI requested a review from samvaity November 5, 2025 23:17
Copilot finished work on behalf of samvaity November 5, 2025 23:17
The snippet below creates a synchronous Event Hub producer.

```java com.azure.messaging.eventhubs.eventhubproducerclient.construct
```java
Copy link
Member

Choose a reason for hiding this comment

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

@copilot Add one com.azure.messaging.eventhubs.eventhubproducerclient.connectionstring example in EventHubsJavaDocCodeSamples and reference it here instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added the connection string example in EventHubsJavaDocCodeSamples.java with label com.azure.messaging.eventhubs.eventhubproducerclient.connectionstring and updated the README to reference it. The section now properly demonstrates creating a producer using a connection string as intended. (commit 41b006b)

Copilot AI changed the title Fix duplicate code snippet label in azure-messaging-eventhubs README Fix duplicate code snippet label and add connection string example in azure-messaging-eventhubs README Nov 6, 2025
Copilot AI requested a review from samvaity November 6, 2025 00:22
Copilot finished work on behalf of samvaity November 6, 2025 00:22
@samvaity samvaity marked this pull request as ready for review November 6, 2025 19:00
Copilot AI review requested due to automatic review settings November 6, 2025 19:00
@samvaity samvaity requested a review from a team as a code owner November 6, 2025 19:00
samvaity
samvaity previously approved these changes Nov 6, 2025
Copy link
Contributor

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 updates the Event Hubs authentication documentation in the README to prioritize connection string-based authentication over token credential-based authentication. The main example under "Authenticate the client" is changed from using DefaultAzureCredential to using a connection string, and a new code sample method is added to support this documentation change.

  • Changed the primary authentication example in README from DefaultAzureCredential to connection string
  • Added createProducerWithConnectionString() method to EventHubsJavaDocCodeSamples.java
  • Updated README code snippet reference from eventhubproducerclient.construct to eventhubproducerclient.connectionstring

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
EventHubsJavaDocCodeSamples.java Added new method demonstrating Event Hub producer creation using connection string
README.md Changed the primary authentication example from DefaultAzureCredential to connection string

@samvaity samvaity linked an issue Nov 11, 2025 that may be closed by this pull request
alzimmermsft
alzimmermsft previously approved these changes Nov 11, 2025
@samvaity samvaity enabled auto-merge (squash) November 11, 2025 22:03
@github-actions
Copy link
Contributor

Hi @copilot. We've noticed that new changes have been pushed to this pull request. Because it is set to automatically merge, we've reset the approvals to allow the opportunity to review the updates.

@github-actions github-actions bot dismissed stale reviews from samvaity and alzimmermsft November 11, 2025 22:03

Hi @samvaity. We've noticed that new changes have been pushed to this pull request. Because it is set to automatically merge, we've reset the approvals to allow the opportunity to review the updates.

@github-actions
Copy link
Contributor

Hi @copilot. We've noticed that new changes have been pushed to this pull request. Because it is set to automatically merge, we've reset the approvals to allow the opportunity to review the updates.

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.

[Java SDK][azure-messaging-eventhubs] Extra Label [Java SDK][azure-messaging-eventhubs] Extra Label

3 participants