Skip to content

Conversation

@prakash100198
Copy link
Contributor

@prakash100198 prakash100198 commented Jul 15, 2025

Description

Fixes https://github.com/devtron-labs/sprint-tasks/issues/2477

Checklist:

  • The title of the PR states what changed and the related issues number (used for the release note).
  • Does this PR requires documentation updates?
  • I've updated documentation as required by this PR.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have tested it for all user roles.
  • I have added all the required unit/api test cases.

Does this PR introduce a user-facing change?


Summary by Bito

This PR resolves an API token visibility bug by implementing the HideApiToken flag across create and update response models. The changes include adding field declarations, methods, and JSON marshalling logic to ensure consistent and secure token visibility control in API responses. Configuration-driven modifications were made to the service layer.

@github-actions
Copy link

Some linked issues are invalid. Please update the issue links:\nIssue # in is not found or invalid (HTTP 404).\n

@bito-code-review
Copy link

Bito Automatic Review Skipped - Branch Excluded

Bito didn't auto-review because the source or target branch is excluded from automatic reviews.
No action is needed if you didn't intend for the agent to review it. Otherwise, to manually trigger a review, type /review in a comment and save.
You can change the branch exclusion settings here, or contact your Bito workspace admin at [email protected].

@prakash100198 prakash100198 changed the title Add HideApiToken field to API token responses and update serialization fix: send HideApiToken env var in api token create/update response Jul 15, 2025
@prakash100198 prakash100198 changed the title fix: send HideApiToken env var in api token create/update response chore: send HideApiToken env var in api token create/update response Jul 15, 2025
@github-actions
Copy link

Some linked issues are invalid. Please update the issue links:\nIssue # in is not found or invalid (HTTP 404).\n

@prakash100198 prakash100198 changed the title chore: send HideApiToken env var in api token create/update response fix: send HideApiToken env var in api token create/update response Jul 15, 2025
@github-actions
Copy link

Some linked issues are invalid. Please update the issue links:\nIssue # in is not found or invalid (HTTP 404).\n

1 similar comment
@github-actions
Copy link

Some linked issues are invalid. Please update the issue links:\nIssue # in is not found or invalid (HTTP 404).\n

@Shivam-nagar23
Copy link
Member

/review

@bito-code-review
Copy link

bito-code-review bot commented Jul 15, 2025

Code Review Agent Run #f75900

Actionable Suggestions - 0
Review Details
  • Files reviewed - 3 · Commit Range: ece9d10..ece9d10
    • api/openapi/openapiClient/model_create_api_token_response.go
    • api/openapi/openapiClient/model_update_api_token_response.go
    • pkg/apiToken/ApiTokenService.go
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Default Agent You can customize the agent settings here or contact your Bito workspace admin at [email protected].

Documentation & Help

AI Code Review powered by Bito Logo

@bito-code-review
Copy link

Changelist by Bito

This pull request implements the following key changes.

Key Change Files Impacted
Bug Fix - Hide API Token Response Handling Fix

model_create_api_token_response.go - Added the HideApiToken field along with its getter, setter, and JSON marshalling updates to securely manage token visibility.

model_update_api_token_response.go - Enhanced the update response model by incorporating the HideApiToken field and corresponding accessor methods to control token exposure.

ApiTokenService.go - Integrated the HideApiToken configuration within the service layer to correctly set the flag during token creation and update operations.

@github-actions
Copy link

Some linked issues are invalid. Please update the issue links:\nIssue # in is not found or invalid (HTTP 404).\n

@github-actions
Copy link

Some linked issues are invalid. Please update the issue links:\nIssue # in is not found or invalid (HTTP 404).\n

@sonarqubecloud
Copy link

@prakash100198 prakash100198 changed the title fix: send HideApiToken env var in api token create/update response chore: send HideApiToken env var in api token create/update response Jul 16, 2025
@github-actions
Copy link

Some linked issues are invalid. Please update the issue links:\nIssue # in is not found or invalid (HTTP 404).\n

@prakash100198 prakash100198 changed the title chore: send HideApiToken env var in api token create/update response sync: send HideApiToken env var in api token create/update response Jul 16, 2025
@github-actions
Copy link

Some linked issues are invalid. Please update the issue links:\nIssue # in is not found or invalid (HTTP 404).\n

@prakash100198 prakash100198 changed the title sync: send HideApiToken env var in api token create/update response sync: send HideApiToken env var in api token create and update response Jul 16, 2025
@github-actions
Copy link

Some linked issues are invalid. Please update the issue links:\nIssue # in is not found or invalid (HTTP 404).\n

@prakash100198 prakash100198 changed the title sync: send HideApiToken env var in api token create and update response fix: send HideApiToken env var in api token create and update response Jul 16, 2025
@prakash100198 prakash100198 changed the title fix: send HideApiToken env var in api token create and update response fix: send HideApiToken env var in api token create and update response Jul 16, 2025
@prakash100198 prakash100198 merged commit 08827c2 into develop Jul 16, 2025
14 of 18 checks passed
@prakash100198 prakash100198 deleted the api-token-hide-in-resp branch July 16, 2025 06:29
@bito-code-review
Copy link

bito-code-review bot commented Jul 16, 2025

Bito Review Skipped - Source Branch Not Found

Bito didn’t review this change because the pull request is no longer valid. It may have been merged, or the source/target branch may no longer exist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants