没有不值得去解决的问题,也没有不值得去学习的技术!

Connecting ChatGPT to GitHub: AI Reads the go-tour-i18n Repository for Translation Review

Figure 4: GitHub and ChatGPT successfully connected

作者:

在

,

Recently, I have been advancing the A Tour of Go multilingual translation project.

The project repository is go-tour-i18n, with the first phase focusing on completing the Simplified Chinese zh-CN. So far, the automatic translation and structural validation for all 103 officially released pages have been completed, and we are now entering the pre-release text quality review phase.

In this phase, I originally continued using the previous collaboration method:

  • Codex is responsible for reading the repository, executing commands, modifying code, and running tests;
  • ChatGPT is responsible for analyzing proposals, reviewing translations, and determining whether adjustments are needed;
  • If ChatGPT needs to understand the actual contents of the repository, I copy Codex’s output to ChatGPT.

This approach works fine, but when the review scope expanded from a few representative pages to 103 complete course pages, one problem became increasingly apparent:

If ChatGPT itself cannot directly read the GitHub repository, a significant amount of time is spent on me manually forwarding Codex’s output.

Coincidentally, during this review process, I noticed that the ChatGPT I am currently using can now directly connect to GitHub.

So, I decided to pause the text review and try connecting GitHub first.

1. Why I Only Thought of Connecting GitHub Now

When developing go-tour-i18n previously, Codex was always well-suited for handling repository-level tasks.

For example:

  • Searching source code;
  • Modifying Go code;
  • Adjusting protection rules;
  • Running tests;
  • Checking Git diffs;
  • Committing code.

ChatGPT, on the other hand, is better suited for another type of task:

  • Determining whether the Chinese translation is natural;
  • Comparing the English source text with the Chinese translation;
  • Analyzing whether a failure is a model issue or a validator issue;
  • Discussing project architecture;
  • Organizing the next tasks for Codex to execute.

The division of labor between the two has actually always been quite clear.

The problem was that when ChatGPT needed to review the actual repository contents, I often had to go through this extra layer:

Plaintext
GitHub / Local repository
        ↓
      Codex
        ↓
Codex output results
        ↓
Manual copy by me
        ↓
     ChatGPT

For a single page, this wasn’t much of an issue.

But for the pre-release review, I had to review 103 pages one by one. If I had to let Codex output the full content for each batch and then copy it back, the entire process would become noticeably cumbersome.

So, when ChatGPT prompted that it could connect to GitHub, I decided to solve this problem first.

Figure 1: A prompt to connect to GitHub appears in the ChatGPT conversation
Figure 1: A prompt to connect to GitHub appears in the ChatGPT conversation

My goal here was not to let ChatGPT take over Codex.

Quite the opposite. I wanted to retain the original division of labor and simply give ChatGPT one additional capability:

When a review is needed, it can directly read the actual repository contents from GitHub.

2. Encountering MFA First During the Connection Process

After clicking connect, it did not immediately proceed to GitHub repository authorization.

My connection process first prompted:

Multi-factor authentication (MFA) needs to be enabled

Figure 2: Prompt to enable multi-factor authentication (MFA) when connecting to GitHub
Figure 2: Prompt to enable multi-factor authentication (MFA) when connecting to GitHub

I had not prepared multi-factor authentication for this connection beforehand, so this added an extra step for authenticator configuration.

Only after completing this step could I continue with the subsequent GitHub authorization process.

Different accounts have different existing GitHub security settings, so the steps seen during an actual connection may not be exactly the same. Therefore, what I am recording here is mainly the process I encountered during my actual operation, rather than stating that all accounts will go through the exact same steps when connecting to GitHub.

3. Entering GitHub’s Installation and Authorization Page

After completing the previous identity verification, I entered GitHub’s app installation and authorization page.

This is the step I consider most worth examining carefully in the entire connection process.

Figure 3: Installing and authorizing ChatGPT Codex Connector in GitHub
Figure 3: Installing and authorizing ChatGPT Codex Connector in GitHub

On this page, you can choose between:

  • All repositories
  • Only select repositories

That is:

Allowing access to all repositories, or only allowing access to specified repositories.

The screenshot for this time shows that I selected all repositories, which was my actual operational state at the time.

However, if you only want ChatGPT to assist in analyzing a specific project, you can also choose to grant access only to the repositories you need to use, based on your actual requirements.

Besides the repository scope, the page also shows the specific permissions requested by the app.

Therefore, during authorization, I think what is worth noting is not just “whether the connection can be successful”, but also:

  • Which repositories it can access;
  • What permissions it requests;
  • Whether the currently selected authorization scope meets your actual needs.

This is also why I felt this operation was worth documenting separately.

Connecting a development tool is not simply:

Click “Connect” → Done.

In between, it actually involves a rather specific permission selection.

4. Connection Completed

After authorization was completed, I returned to ChatGPT. The original GitHub card had changed from:

Connect

To:

Connected

Figure 4: GitHub and ChatGPT successfully connected
Figure 4: GitHub and ChatGPT successfully connected

At this point, I did not immediately have ChatGPT modify any repository contents.

My first reaction was instead:

First verify whether it can actually correctly read go-tour-i18n.

Because “the interface showing it is connected” and “actually being able to accurately read the current project repository” are two different things.

Moreover, my purpose in connecting GitHub this time was never to add a new entry point for automated code modifications.

What I needed most was:

Letting ChatGPT directly see the actual materials it is reviewing.

This happens to align well with the division of labor I am currently using.

5. How Project Collaboration Changed After Connecting GitHub

Before connecting, my workflow was closer to:

Plaintext
Codex reads repository
        ↓
Outputs file contents and results
        ↓
I copy to ChatGPT
        ↓
ChatGPT reviews
        ↓
Then organizes instructions for Codex

After connecting, it can be simplified to:

Plaintext
GitHub repository
   ↙       ↘
Codex     ChatGPT
Modifications & execution   Direct read-only review
   ↘       ↙
   I make the final decision

The most important change here is not “copying text a few times less”.

More importantly:

ChatGPT can make judgments directly based on the actual files in the repository, rather than just a small snippet of results I copied back from another tool.

For example, in this Chinese text review for A Tour of Go, I needed to simultaneously check:

  • The official English .article;
  • The corresponding zh-CN candidate;
  • Glossary;
  • Protected token rules;
  • Terminology consistency across different pages.

If all this content had to be relayed by Codex first before being handed over to ChatGPT, the information chain would be quite long.

With direct access to GitHub, ChatGPT can read the necessary files itself, and I only need to decide:

What to review in the next batch.

For this kind of long-term project requiring continuous maintenance, this is particularly useful.

6. But I Don’t Plan to Abandon Codex Because of This

After the successful connection, I became even more certain that:

ChatGPT and Codex do not need to replace each other.

At least in this current project, I prefer this division of responsibilities.

ChatGPT

Responsible for:

  • Translation quality review;
  • English and Chinese semantic comparison;
  • Terminology judgment;
  • Architecture discussion;
  • Anomaly cause analysis;
  • Modification proposal review;
  • Organizing controlled execution instructions for Codex.

Codex

Responsible for:

  • Repository-level search;
  • Precise file modifications;
  • Executing Go tests;
  • Running the validator;
  • Checking Git diffs;
  • Committing and pushing.

The GitHub connection only solved an information transfer barrier that previously existed between the two.

It did not change a principle I have always valued:

The tool responsible for judgment and the tool responsible for executing modifications can each leverage their own strengths.

7. First Practical Use After Connection: Reviewing A Tour of Go Chinese Translation

After completing the GitHub connection, I did not test it with an unrelated small repository first.

The next step was to directly return to the ongoing go-tour-i18n:

Reviewing the 103 Chinese course pages page by page.

This was also the most direct practical verification of connecting GitHub this time.

In the past, to do this kind of review, I usually had to let Codex read the English source code and the Chinese candidate first, return the results, and then I would copy them to ChatGPT.

This time, ChatGPT could directly read the English source code and the corresponding Chinese translation from the frozen baseline in the GitHub repository, and then conduct a read-only audit batch by batch.

However, once the review actually started, two issues emerged that are quite worth documenting separately.

The first one is:

Should channel be translated as “通道” (channel), “管道” (pipe), “信道” (signal channel), or should Channel be kept as is?

What was originally just a terminology issue on a single page eventually evolved into a more systematic Chinese Go technical terminology calibration than expected.

The second one is:

After all 103 pages were checked, how many pages actually needed modifications?

The results were also somewhat different from what I initially imagined.

So, I plan to write two separate articles on these two topics:

  1. Unifying Chinese Terminology for A Tour of Go: Why channel Ultimately Chose “通道”
  2. Only 16 Pages Reworked After Page-by-Page Review of 103 Pages: Pre-Release Quality Audit of A Tour of Go Chinese Text

Thus, this article only solves one problem:

How to connect ChatGPT directly to GitHub and integrate this capability into the existing project collaboration workflow.

8. Summary

In the past, I mostly treated ChatGPT as a:

Reviewer that required me to provide materials to it.

After connecting GitHub this time, a noticeable change is:

The materials in the repository can be read by ChatGPT itself.

For one-off Q&A, this change might not feel very significant.

But for a project like go-tour-i18n that requires long-term maintenance, continuous upstream syncing, and repeated review of translations and code, it can significantly shorten the original information chain:

Plaintext
Repository
→ Codex
→ Me
→ ChatGPT

At the same time, I will temporarily not let this connection change the current basic division of labor:

ChatGPT is responsible for analysis and review, while Codex is responsible for repository-level modifications, testing, and committing.

So, for me, this GitHub connection is more like giving ChatGPT a pair of “eyes” that can directly view the repository.

It is still responsible for judgment, but I no longer need to manually move every piece of material in front of it.

And the first complete task performed after the connection was completed was:

The pre-release quality audit of 103 A Tour of Go Chinese course pages.

In the next article, I plan to start with an issue that unexpectedly popped up:

channel, what exactly should it be called in the Chinese Go world?

关于作者 · 持续学习与技术实践

我是一名拥有 15 年以上开发经验的技术从业者,自 2013 年起持续运营个人技术博客,记录工作与个人项目中遇到的真实问题,以及解决问题过程中的探索、实践和思考。

除了技术写作,我也在持续开发和维护自己的独立项目,探索新技术和新工具在实际场景中的应用。我始终相信,没有不值得去解决的问题,也没有不值得去学习的技术。

如果这篇文章对你有所帮助,欢迎浏览博客中的其他文章,也欢迎交流技术经验与想法。

关于我  ·  GitHub  ·  邮件联系