Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions docs/docs/connections/local-repos.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,30 @@ The commit graph can be updated when fetching with `--write-commit-graph`:
git fetch --write-commit-graph
```

## Permission issues

When running a Sync Job on your local repositories, if you have a different user than the one that Sourcebot runs as
(in Docker, the Sourcebot user is 1500:1500), you may encounter the following error:
Comment on lines +96 to +97
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

Break up this long sentence and verify bold formatting.

This sentence is too long and complex. Break it into shorter, more direct sentences that lead with what the user needs to know. If "Sync Job" is a UI element or key term, it should be bolded.

As per coding guidelines: "write in second person ('you') and present tense, keep sentences short and direct, leading with what the user needs to know" and "use bold for UI elements and key terms."

✍️ Proposed rewrite
-When running a Sync Job on your local repositories, if you have a different user than the one that Sourcebot runs as
-(in Docker, the Sourcebot user is 1500:1500), you may encounter the following error:
+When syncing local repositories, you may encounter an ownership error if your user differs from Sourcebot's user (1500:1500 in Docker):

Or if "Sync Job" is a UI element:

-When running a Sync Job on your local repositories, if you have a different user than the one that Sourcebot runs as
-(in Docker, the Sourcebot user is 1500:1500), you may encounter the following error:
+When running a **Sync Job** on local repositories, you may encounter an ownership error if your user differs from Sourcebot's user (1500:1500 in Docker):
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
When running a Sync Job on your local repositories, if you have a different user than the one that Sourcebot runs as
(in Docker, the Sourcebot user is 1500:1500), you may encounter the following error:
When running a **Sync Job** on local repositories, you may encounter an ownership error if your user differs from Sourcebot's user (1500:1500 in Docker):
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/docs/connections/local-repos.mdx` around lines 96 - 97, Split the long
sentence into two or three short, direct sentences that lead with the user's
action and environment; make sure the UI term "Sync Job" is bold (e.g., **Sync
Job**) wherever used. For example, start with "If you run a **Sync Job** on
local repositories, you may see an error when your user differs from the
Sourcebot user." Then add a second sentence with the Docker detail: "In Docker,
the Sourcebot user is 1500:1500, so mismatch with your user can cause this
error." Ensure phrasing is in second person, present tense, and keep sentences
short and clear.


```sh
fatal: detected dubious ownership in repository at '/repos/org_name/repo_name.git'
To add an exception for this directory, call:
git config --global --add safe.directory /repos/org_name/repo_name.git.git
```

As the code should be read-only by sourcebot, you can use the following [git-config environment variables](https://git-scm.com/docs/git-config#ENVIRONMENT)
to allow Sourcebot to read from any repository, regardless of ownership:
Comment on lines +105 to +106
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

Break up this sentence and fix inconsistent capitalization.

This sentence is too long. Break it into shorter, more direct sentences. Also, "sourcebot" should be capitalized as "Sourcebot" for consistency with the rest of the document.

As per coding guidelines: "keep sentences short and direct, leading with what the user needs to know."

✍️ Proposed rewrite
-As the code should be read-only by sourcebot, you can use the following [git-config environment variables](https://git-scm.com/docs/git-config#ENVIRONMENT)
-to allow Sourcebot to read from any repository, regardless of ownership:
+Sourcebot only needs read access to your repositories. You can use [git-config environment variables](https://git-scm.com/docs/git-config#ENVIRONMENT) to allow Sourcebot to read any repository, regardless of ownership:
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
As the code should be read-only by sourcebot, you can use the following [git-config environment variables](https://git-scm.com/docs/git-config#ENVIRONMENT)
to allow Sourcebot to read from any repository, regardless of ownership:
Sourcebot only needs read access to your repositories. You can use [git-config environment variables](https://git-scm.com/docs/git-config#ENVIRONMENT) to allow Sourcebot to read any repository, regardless of ownership:
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/docs/connections/local-repos.mdx` around lines 105 - 106, Split the long
sentence that begins "As the code should be read-only by sourcebot, you can use
the following git-config environment variables…" into two shorter, direct
sentences and capitalize "Sourcebot"; e.g., first state that the code must be
read-only for Sourcebot, then on a new sentence introduce the git-config
environment variables and the link. Ensure wording is concise and leads with
what the user needs to know.


```sh
GIT_CONFIG_COUNT=1
GIT_CONFIG_KEY_0=safe.directory
GIT_CONFIG_VALUE_0=*
```

If you're using docker-compose, this can be added to the `environment` section of the `sourcebot` service
in the [docker-compose](https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/docker-compose.yml) file,
otherwise you can set these environment variables in the environment where sourcebot is running.
Comment on lines +114 to +116
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

Break up this run-on sentence and fix formatting inconsistencies.

This sentence is too long and tries to cover multiple deployment scenarios. Break it into shorter sentences. Also:

  • Format docker-compose as inline code for consistency with other technical terms
  • Capitalize "sourcebot" as "Sourcebot" for consistency with the rest of the document

As per coding guidelines: "keep sentences short and direct, leading with what the user needs to know" and "use inline code for technical values, flags, and identifiers."

✍️ Proposed rewrite
-If you're using docker-compose, this can be added to the `environment` section of the `sourcebot` service
-in the [docker-compose](https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/docker-compose.yml) file,
-otherwise you can set these environment variables in the environment where sourcebot is running.
+If you're using `docker-compose`, add these variables to the `environment` section of the `sourcebot` service
+in the [docker-compose](https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/docker-compose.yml) file.
+Otherwise, set these environment variables in the environment where Sourcebot is running.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
If you're using docker-compose, this can be added to the `environment` section of the `sourcebot` service
in the [docker-compose](https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/docker-compose.yml) file,
otherwise you can set these environment variables in the environment where sourcebot is running.
If you're using `docker-compose`, add these variables to the `environment` section of the `sourcebot` service
in the [docker-compose](https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/docker-compose.yml) file.
Otherwise, set these environment variables in the environment where Sourcebot is running.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/docs/connections/local-repos.mdx` around lines 114 - 116, Split the long
sentence into two short, direct sentences: first state that if using
`docker-compose` you can add the variables to the `environment` section of the
`sourcebot` service in the linked `docker-compose.yml`, and second state that
otherwise you can set the same environment variables in the environment where
Sourcebot is running. Format `docker-compose` and `environment` as inline code,
and capitalize "Sourcebot" for consistency.


## Schema reference

<Accordion title="Reference">
Expand Down