End the sync log with Skipped when there is no GitHub mirror
TirSystem/github-action: Publish wiki / publish-wiki (push) Skipped
TirSystem/github-action: Sync GitHub mirror metadata / sync-metadata (push) Skipped
Validate workflows / validate (pull_request) Successful in 14s

Task: MIL-001#1
This commit is contained in:
2026-10-11 10:42:18 +08:00
parent 532e9663cb
commit aa88ea6f8b
7 changed files with 16 additions and 11 deletions
+2
View File
@@ -22,6 +22,8 @@ Each release lists its changes in these groups, in this order:
### Changed
- Sync GitHub mirror metadata: a repository without a GitHub push mirror still
succeeds, and the log now ends with the line `Skipped`.
- The scoped workflows fetch their scripts at the tag `v1` instead of `main`,
so a merge to `main` reaches consumers only when it is released.
+3 -3
View File
@@ -43,9 +43,9 @@ never starts, or stops before the step) is a **runner** problem.
## Not an error
`No GitHub push mirror configured for <repo>; nothing to sync.` The run
succeeds. Not every Gitea repository has a GitHub mirror, so this is expected
for those. If the repository should have one, add it in the repository
`No GitHub push mirror configured for <repo>; nothing to sync.` followed by
`Skipped`. The run succeeds. Not every Gitea repository has a GitHub mirror, so
this is expected for those. If the repository should have one, add it in the repository
settings.
`WARNING: Gitea returned an invalid push mirror list; GitHub metadata was not
+3 -1
View File
@@ -245,7 +245,9 @@ class TestMain:
assert all(call[0] == "GET" for call in api.calls)
assert not any(call[1].startswith("https://api.github.com") for call in api.calls)
assert "No GitHub push mirror configured" in capsys.readouterr().out
output = capsys.readouterr().out
assert "No GitHub push mirror configured" in output
assert output.rstrip().splitlines()[-1] == "Skipped"
def test_fails_before_any_change_when_github_credentials_are_missing(
self, sync, environment, monkeypatch
+1
View File
@@ -170,6 +170,7 @@ def main():
"No GitHub push mirror configured for "
f"{source_owner}/{source_repo}; nothing to sync."
)
print("Skipped")
return 0
github_token = parse_github_token(os.environ.get("PAT_FOR_GITHUB"))
+2 -2
View File
@@ -1,4 +1,4 @@
<!-- translation of Troubleshooting.md, source sha256 e8a34cbe7e93 -->
<!-- translation of Troubleshooting.md, source sha256 eb63f4109a0d -->
> Dette er en oversættelse af [`Troubleshooting`](Troubleshooting). Den engelske side er autoritativ, og ændringer her bliver overskrevet, næste gang wikien publiceres.
@@ -47,7 +47,7 @@ Kategorien fortæller, hvor du skal kigge. En fejl uden for scriptet (jobbet sta
## Ikke en fejl
`No GitHub push mirror configured for <repo>; nothing to sync.` Kørslen lykkes. Ikke alle Gitea-repositories har et GitHub-spejl, så det er forventet for dem. Hvis repositoryet skal have et, så tilføj det i repositoryets indstillinger.
`No GitHub push mirror configured for <repo>; nothing to sync.` efterfulgt af `Skipped`. Kørslen lykkes. Ikke alle Gitea-repositories har et GitHub-spejl, så det er forventet for dem. Hvis repositoryet skal have et, så tilføj det i repositoryets indstillinger.
`WARNING: Gitea returned an invalid push mirror list; GitHub metadata was not synced.` Kørslen lykkes, men intet blev synkroniseret. Kontroller, at Gitea-versionen understøtter push mirror-API'et, og kør igen.
+3 -3
View File
@@ -49,9 +49,9 @@ never starts, or stops before the step) is a **runner** problem.
## Not an error
`No GitHub push mirror configured for <repo>; nothing to sync.` The run
succeeds. Not every Gitea repository has a GitHub mirror, so this is expected
for those. If the repository should have one, add it in the repository
`No GitHub push mirror configured for <repo>; nothing to sync.` followed by
`Skipped`. The run succeeds. Not every Gitea repository has a GitHub mirror, so
this is expected for those. If the repository should have one, add it in the repository
settings.
`WARNING: Gitea returned an invalid push mirror list; GitHub metadata was not
+2 -2
View File
@@ -1,4 +1,4 @@
<!-- translation of Troubleshooting.md, source sha256 e8a34cbe7e93 -->
<!-- translation of Troubleshooting.md, source sha256 eb63f4109a0d -->
> Ini ialah terjemahan [`Troubleshooting`](Troubleshooting). Halaman bahasa Inggeris ialah teks yang sah, dan perubahan di sini akan ditimpa pada penerbitan wiki yang seterusnya.
@@ -47,7 +47,7 @@ Kategori menunjukkan di mana perlu dilihat. Kegagalan di luar skrip (kerja tidak
## Bukan satu ralat
`No GitHub push mirror configured for <repo>; nothing to sync.` Larian berjaya. Tidak semua repositori Gitea mempunyai cermin GitHub, jadi ini dijangka bagi repositori tersebut. Jika repositori itu sepatutnya mempunyainya, tambahkannya dalam tetapan repositori.
`No GitHub push mirror configured for <repo>; nothing to sync.` diikuti oleh `Skipped`. Larian berjaya. Tidak semua repositori Gitea mempunyai cermin GitHub, jadi ini dijangka bagi repositori tersebut. Jika repositori itu sepatutnya mempunyainya, tambahkannya dalam tetapan repositori.
`WARNING: Gitea returned an invalid push mirror list; GitHub metadata was not synced.` Larian berjaya tetapi tiada apa-apa disegerakkan. Semak bahawa versi Gitea menyokong API push mirror dan jalankan semula.