Skip to content

CON-1837 Return information about job#89

Merged
az-smartling merged 4 commits into
masterfrom
return-information-about-job
Nov 25, 2025
Merged

CON-1837 Return information about job#89
az-smartling merged 4 commits into
masterfrom
return-information-about-job

Conversation

@az-smartling

@az-smartling az-smartling commented Nov 3, 2025

Copy link
Copy Markdown
Contributor

Return information about job

Smartling/api-sdk-go#19

@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello @az-smartling, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly improves the user feedback provided after a file push operation by displaying comprehensive information about the associated Smartling job. It ensures that users can quickly access the job's unique identifier, its human-readable name, and a direct link to its page within the Smartling dashboard, streamlining the workflow for tracking translation jobs. This enhancement is supported by an update to the Smartling API SDK and new logic for retrieving and presenting job details.

Highlights

  • Enhanced Job Information Output: The runPush function now prints the Smartling Job UID, Job Name, and a direct URL to the job in the Smartling dashboard after a file push operation.
  • Dynamic Job Name Retrieval: Logic has been added to explicitly retrieve the job name using s.BatchApi.GetJob if an existing job is being used and its name is not immediately available.
  • Smartling API SDK Update: The github.com/Smartling/api-sdk-go dependency has been updated to a newer version, likely providing the necessary API capabilities for the enhanced job information.
  • New Utility Function: A getJobURL helper function was introduced to construct the correct Smartling dashboard URL for a given project and job UID.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request enhances the push command by displaying the Smartling job's UID, name, and URL after execution. This is a helpful addition for users. The implementation correctly handles cases for both creating a new job and using an existing one. My review includes a suggestion to improve the maintainability and readability of the new getJobURL function by using string formatting, which is more idiomatic in Go.

Comment thread services/files/run_push.go Outdated
@az-smartling az-smartling changed the title Return information about job CON-1837 Return information about job Nov 21, 2025
Comment thread services/files/run_push.go Outdated
Comment on lines 163 to 167
pattern := `^[a-z0-9]{12}$`
var jobUID string
if re := regexp.MustCompile(pattern); params.JobIDOrName != "" && re.MatchString(params.JobIDOrName) {
jobUID = params.JobIDOrName
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Since we added the GetJob API, we can finally remove this hack (guessing if it is a real UID).

The new flow can be:

  • We can keep this regex to validate UID
  • GetJob(projectID, jobUID)
  • If it returned the job without the error, then use jobUID and received jobName
  • Otherwise, create a new job.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

implemented

az-smartling and others added 2 commits November 21, 2025 18:07
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@az-smartling az-smartling merged commit 9d674bb into master Nov 25, 2025
@az-smartling az-smartling deleted the return-information-about-job branch November 25, 2025 14:04
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