End the sync log with Skipped when there is no GitHub mirror #88
@@ -22,6 +22,8 @@ Each release lists its changes in these groups, in this order:
|
|||||||
|
|
||||||
### Changed
|
### 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`,
|
- 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.
|
so a merge to `main` reaches consumers only when it is released.
|
||||||
|
|
||||||
|
|||||||
@@ -43,9 +43,9 @@ never starts, or stops before the step) is a **runner** problem.
|
|||||||
|
|
||||||
## Not an error
|
## Not an error
|
||||||
|
|
||||||
`No GitHub push mirror configured for <repo>; nothing to sync.` The run
|
`No GitHub push mirror configured for <repo>; nothing to sync.` followed by
|
||||||
succeeds. Not every Gitea repository has a GitHub mirror, so this is expected
|
`Skipped`. The run succeeds. Not every Gitea repository has a GitHub mirror, so
|
||||||
for those. If the repository should have one, add it in the repository
|
this is expected for those. If the repository should have one, add it in the repository
|
||||||
settings.
|
settings.
|
||||||
|
|
||||||
`WARNING: Gitea returned an invalid push mirror list; GitHub metadata was not
|
`WARNING: Gitea returned an invalid push mirror list; GitHub metadata was not
|
||||||
|
|||||||
@@ -245,7 +245,9 @@ class TestMain:
|
|||||||
|
|
||||||
assert all(call[0] == "GET" for call in api.calls)
|
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 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(
|
def test_fails_before_any_change_when_github_credentials_are_missing(
|
||||||
self, sync, environment, monkeypatch
|
self, sync, environment, monkeypatch
|
||||||
|
|||||||
@@ -170,6 +170,7 @@ def main():
|
|||||||
"No GitHub push mirror configured for "
|
"No GitHub push mirror configured for "
|
||||||
f"{source_owner}/{source_repo}; nothing to sync."
|
f"{source_owner}/{source_repo}; nothing to sync."
|
||||||
)
|
)
|
||||||
|
print("Skipped")
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
github_token = parse_github_token(os.environ.get("PAT_FOR_GITHUB"))
|
github_token = parse_github_token(os.environ.get("PAT_FOR_GITHUB"))
|
||||||
|
|||||||
@@ -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.
|
> 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
|
## 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.
|
`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.
|
||||||
|
|
||||||
|
|||||||
@@ -49,9 +49,9 @@ never starts, or stops before the step) is a **runner** problem.
|
|||||||
|
|
||||||
## Not an error
|
## Not an error
|
||||||
|
|
||||||
`No GitHub push mirror configured for <repo>; nothing to sync.` The run
|
`No GitHub push mirror configured for <repo>; nothing to sync.` followed by
|
||||||
succeeds. Not every Gitea repository has a GitHub mirror, so this is expected
|
`Skipped`. The run succeeds. Not every Gitea repository has a GitHub mirror, so
|
||||||
for those. If the repository should have one, add it in the repository
|
this is expected for those. If the repository should have one, add it in the repository
|
||||||
settings.
|
settings.
|
||||||
|
|
||||||
`WARNING: Gitea returned an invalid push mirror list; GitHub metadata was not
|
`WARNING: Gitea returned an invalid push mirror list; GitHub metadata was not
|
||||||
|
|||||||
@@ -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.
|
> 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
|
## 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.
|
`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.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user