Skip to content

Commit 77431b4

Browse files
Address AI feedback
Signed-off-by: Lukasz Gryglicki <[email protected]> Assisted by [OpenAI](https://platform.openai.com/) Assisted by [GitHub Copilot](https://github.com/features/copilot)
1 parent 2d742d0 commit 77431b4

File tree

5 files changed

+11
-20
lines changed

5 files changed

+11
-20
lines changed

cla-backend-go/company/service.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ company.You can choose to accept or deny the request.
471471
</p>
472472
%s
473473
%s`,
474-
recipientName, companyName, companyName, requestedUserInfo, utils.GetCorporateURL(false),
474+
recipientName, companyName, companyName, requestedUserInfo, utils.GetCorporateURL(),
475475
utils.GetEmailHelpContent(false), utils.GetEmailSignOffContent())
476476

477477
err := utils.SendEmail(subject, body, recipients)
@@ -508,7 +508,7 @@ Manager status.
508508
</p>
509509
%s
510510
%s`,
511-
recipientName, companyName, companyName, utils.GetCorporateURL(false),
511+
recipientName, companyName, companyName, utils.GetCorporateURL(),
512512
utils.GetEmailHelpContent(false), utils.GetEmailSignOffContent())
513513

514514
err := utils.SendEmail(subject, body, recipients)

cla-backend-go/utils/email.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ func SendEmail(subject string, body string, recipients []string) error {
9999
return emailSender.SendEmail(subject, body, recipients)
100100
}
101101

102-
// GetCorporateURL returns the corporate URL based on the specified flag
103-
func GetCorporateURL(isV2Project bool) string {
102+
// GetCorporateURL returns the corporate V2 URL (V1 has been shut down)
103+
func GetCorporateURL() string {
104104
// V1 corporate console has been shut down - always return V2 URL
105105
return config.GetConfig().CorporateConsoleV2URL
106106
}

cla-backend-go/v2/company/handlers.go

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -636,17 +636,8 @@ func Configure(api *operations.EasyclaAPI, service Service, projectClaGroupRepo
636636
reqID := utils.GetRequestID(params.XREQUESTID)
637637
ctx := context.WithValue(context.Background(), utils.XREQUESTID, reqID) // nolint
638638

639-
corporateLink := ""
640-
// Get appropriate corporate link - V1 is no longer supported, redirect to V2
641-
if params.Body.Version == "v1" {
642-
// V1 corporate console has been shut down - redirect to V2
643-
corporateLink = LFXPortalURL
644-
} else if params.Body.Version == "v2" {
645-
corporateLink = LFXPortalURL
646-
} else {
647-
// Default to V2 if version is not specified
648-
corporateLink = LFXPortalURL
649-
}
639+
// V1 corporate console has been shut down - always use V2 console
640+
corporateLink := LFXPortalURL
650641

651642
err := service.RequestCompanyAdmin(ctx, params.UserID, params.Body.ClaManagerEmail.String(), params.Body.ClaManagerName, params.Body.ContributorName, params.Body.ContributorEmail.String(), params.Body.ProjectName, params.Body.CompanyName, corporateLink)
652643
if err != nil {

cla-backend/cla/models/docusign_models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2481,7 +2481,7 @@ def document_signed_email_content(icla: bool, project: Project, signature: Signa
24812481
f'signatures/{project.get_project_id()}/'
24822482
f'{signature.get_signature_reference_id()}/ccla/pdf')
24832483

2484-
corporate_url = get_corporate_url(project.get_version())
2484+
corporate_url = get_corporate_url()
24852485

24862486
recipient_name = user.get_user_name() or user.get_lf_username() or None
24872487
# some defensive code

cla-backend/cla/utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1924,11 +1924,11 @@ def get_email_sign_off_content() -> str:
19241924
return "<p>Thanks,</p><p>EasyCLA Support Team</p>"
19251925

19261926

1927-
def get_corporate_url(project_version: str) -> str:
1927+
def get_corporate_url() -> str:
19281928
"""
1929-
helper method that returns appropriate corporate link based on EasyCLA version
1930-
:param project_version: cla_group version(v1|v2) - deprecated, always returns V2
1931-
:return: V2 corporate console (V1 has been shut down)
1929+
helper method that returns the corporate V2 console URL
1930+
V1 corporate console has been shut down - always returns V2
1931+
:return: V2 corporate console URL
19321932
"""
19331933
# V1 corporate console has been shut down - always return V2
19341934
return CORPORATE_V2_BASE

0 commit comments

Comments
 (0)