Repository: sharkdp/bat (language: rust)

Issue:
Dependabot submodule updates are broken
(It's probably an upstream error. It should be easily mitigable on `bat`'s side but I lack context to say for sure.)

The Dependabot action to update submodules has been failing since [at least the last couple of months](https://github.com/sharkdp/bat/actions/workflows/dependabot/dependabot-updates?query=is%3Afailure).

The two runs we can access both fail on the same step:

```log
2025-02-01T03:34:09.3613620Z   proxy | 2025/02/01 03:34:09 [066] GET https://api.github.com:443/repos/sharkdp/bat/contents/assets/syntaxes/02_Extra/JavaScript%20(Babel)?ref=4fc55cfcec44dba3f67bd79cac9ccf64dc18eb08
2025-02-01T03:34:09.3614825Z   proxy | 2025/02/01 03:34:09 [066] * authenticating github api request with token for api.github.com
2025-02-01T03:34:09.4715821Z   proxy | 2025/02/01 03:34:09 [066] 404 https://api.github.com:443/repos/sharkdp/bat/contents/assets/syntaxes/02_Extra/JavaScript%20(Babel)?ref=4fc55cfcec44dba3f67bd79cac9ccf64dc18eb08
2025-02-01T03:34:09.4737486Z updater | 2025/02/01 03:34:09 ERROR <job_956925857> Error during file fetching; aborting: assets/syntaxes/02_Extra/JavaScript (Babel) not found
```

Previous runs are all deleted because of the GitHub Actions' eviction policy. But [there's a Dependabot message in a previously-created PR](https://github.com/sharkdp/bat/pull/3023#issuecomment-2489983822) that reports an error on fetching this same submodule.

I only noticed because I was expecting `cmd-help` to be auto-bumped and it was not.

I think I have tracked the bug to the GitHub API, [I have reported it here.](https://github.com/orgs/community/discussions/150556)

## Mitigation

The bug seems to affect submodule files/mappings that contain spaces in their name. We could change those paths to remove spaces and it should fix this workflow.

e.g.:

```diff
# .gitmodules
[submodule "assets/syntaxes/JavaScript (Babel)"]
- 	path = assets/syntaxes/02_Extra/JavaScript (Babel)
+ 	path = assets/syntaxes/02_Extra/JavaScript(Babel)
```

If the error persists, we may try removing parentheses too. But the only bug I've been able to prove is with spaces.


Discussion / hints:
Thanks for investigating and reporting! I'd be okay with removing the space in the name for now to see if it helps
Cool, I'll try my hand at this if that's ok.

It seems I can test these GitHub API calls on my fork too.

Also, thank you (first) for `bat`!

Fix patch:
diff --git a/.gitmodules b/.gitmodules
index 36060a72fd..fe3df9a230 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -65,7 +65,7 @@
 	path = assets/themes/onehalf
 	url = https://github.com/sonph/onehalf
 [submodule "assets/syntaxes/JavaScript (Babel)"]
-	path = assets/syntaxes/02_Extra/JavaScript (Babel)
+	path = assets/syntaxes/02_Extra/JavaScript_(Babel)
 	url = https://github.com/babel/babel-sublime
 [submodule "assets/syntaxes/FSharp"]
 	path = assets/syntaxes/02_Extra/FSharp
@@ -89,7 +89,7 @@
 	path = assets/themes/sublime-snazzy
 	url = https://github.com/greggb/sublime-snazzy
 [submodule "assets/syntaxes/Assembly (ARM)"]
-	path = assets/syntaxes/02_Extra/Assembly (ARM)
+	path = assets/syntaxes/02_Extra/Assembly_(ARM)
 	url = https://github.com/tvi/Sublime-ARM-Assembly
 [submodule "assets/syntaxes/protobuf-syntax-highlighting"]
 	path = assets/syntaxes/02_Extra/Protobuf
@@ -108,7 +108,7 @@
 	path = assets/syntaxes/02_Extra/Fish
 	url = https://github.com/Phidica/sublime-fish.git
 [submodule "assets/syntaxes/Org mode"]
-	path = assets/syntaxes/02_Extra/Org mode
+	path = assets/syntaxes/02_Extra/Org_mode
 	url = https://github.com/jezcope/Org.tmbundle.git
 [submodule "assets/syntaxes/DotENV"]
 	path = assets/syntaxes/02_Extra/DotENV
@@ -142,7 +142,7 @@
 	path = assets/themes/dracula-sublime
 	url = https://github.com/dracula/sublime.git
 [submodule "assets/syntaxes/HTML (Twig)"]
-	path = assets/syntaxes/02_Extra/HTML (Twig)
+	path = assets/syntaxes/02_Extra/HTML_(Twig)
 	url = https://github.com/Anomareh/PHP-Twig.tmbundle.git
 [submodule "assets/themes/Nord-sublime"]
 	path = assets/themes/Nord-sublime
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ce78fd1d92..6110365120 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,8 +3,10 @@
 ## Features
 
 ## Bugfixes
+
 - Fix `BAT_THEME_DARK` and `BAT_THEME_LIGHT` being ignored, see issue #3171 and PR #3168 (@bash)
 - Prevent `--list-themes` from outputting default theme info to stdout when it is piped, see #3189 (@einfachIrgendwer0815)
+- Rename some submodules to fix Dependabot submodule updates, see issue #3198 and PR #3201 (@victor-gp)
 
 ## Other
 
diff --git a/assets/syntaxes/02_Extra/Assembly (ARM) b/assets/syntaxes/02_Extra/Assembly_(ARM)
similarity index 100%
rename from assets/syntaxes/02_Extra/Assembly (ARM)
rename to assets/syntaxes/02_Extra/Assembly_(ARM)
diff --git a/assets/syntaxes/02_Extra/HTML (Twig) b/assets/syntaxes/02_Extra/HTML_(Twig)
similarity index 100%
rename from assets/syntaxes/02_Extra/HTML (Twig)
rename to assets/syntaxes/02_Extra/HTML_(Twig)
diff --git a/assets/syntaxes/02_Extra/JavaScript (Babel) b/assets/syntaxes/02_Extra/JavaScript_(Babel)
similarity index 100%
rename from assets/syntaxes/02_Extra/JavaScript (Babel)
rename to assets/syntaxes/02_Extra/JavaScript_(Babel)
diff --git a/assets/syntaxes/02_Extra/Org mode b/assets/syntaxes/02_Extra/Org_mode
similarity index 100%
rename from assets/syntaxes/02_Extra/Org mode
rename to assets/syntaxes/02_Extra/Org_mode


Test patch: