-
Notifications
You must be signed in to change notification settings - Fork 354
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
feat(support): add issuedesc to metadata #4028
Conversation
Warning There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure. 🔧 eslint
warning eslint@8.57.1: This version is no longer supported. Please see https://eslint.org/version-support for other options. (For a CapTP with native promises, see @endo/eventual-send and @endo/captp) WalkthroughThe changes in this pull request introduce a new property, Changes
Suggested reviewers
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
This pull request is automatically being deployed by Amplify Hosting (learn more). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (2)
packages/@webex/internal-plugin-support/test/unit/spec/support.js (2)
155-161
: Improve test coverage and consistency
The test description uses 'issuedesctag' while the implementation uses 'issueDescTag'. Consider standardizing the casing.
Consider adding these test cases:
- Verify behavior with empty string
- Verify behavior with special characters
- Verify behavior when the tag exceeds reasonable length
Example additional test cases:
it('handles empty issueDescTag gracefully', () => { const issueDescTag = ''; const result = webex.internal.support._constructFileMetadata({issueDescTag}); const found = result.find((attr) => attr.key === 'issueDescTag'); assert.isNull(found); }); it('handles special characters in issueDescTag', () => { const issueDescTag = 'Issue #123: <script>alert("xss")</script>'; const result = webex.internal.support._constructFileMetadata({issueDescTag}); const found = result.find((attr) => attr.key === 'issueDescTag'); assert.equal(found?.value, issueDescTag); });
Line range hint
138-138
: Implementation aligns well with PR objectivesThe addition of the
issueDescTag
metadata field successfully implements the requirement for supporting automatic Jira ticket creation from user-uploaded issue reports. The implementation:
- Follows existing patterns for metadata handling
- Maintains backward compatibility
- Includes appropriate test coverage
- Integrates seamlessly with the existing log upload mechanism
Consider documenting the metadata field format requirements in the code comments to help maintain consistency across different parts of the system that will interact with this field (e.g., the external script that creates Jira tickets).
Also applies to: 155-161
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
packages/@webex/internal-plugin-support/src/support.js
(1 hunks)packages/@webex/internal-plugin-support/test/unit/spec/support.js
(1 hunks)
🔇 Additional comments (1)
packages/@webex/internal-plugin-support/src/support.js (1)
138-138
: Ensure consistent casing in metadata key names
The key name 'issueDescTag' here differs from 'issuedesctag' used in the test description. Consider standardizing the casing across the codebase to prevent potential issues.
Let's check for consistent key naming across the codebase:
This pull request addresses
https://jira-eng-gpk2.cisco.com/jira/browse/SPARK-591744
adds issuedesctag to the metadata in support to match UCF. This enables automatic jira creation based on issue reports uploaded by users by an external script.
by making the following changes
add metadata
Change Type
The following scenarios were tested
unit tests and manual linking with web client
I certified that
Make sure to have followed the contributing guidelines before submitting.
Summary by CodeRabbit
New Features
issueDescTag
, for log uploads in the support functionality.Tests
issueDescTag
in the metadata construction process.