diff options
-rw-r--r-- | MAINTAINERS | 1 | ||||
-rw-r--r-- | options/locale/locale_ga-IE.ini | 69 | ||||
-rw-r--r-- | options/locale/locale_ja-JP.ini | 18 | ||||
-rw-r--r-- | routers/api/v1/repo/action.go | 30 | ||||
-rw-r--r-- | routers/api/v1/repo/repo.go | 44 | ||||
-rw-r--r-- | tests/integration/api_actions_run_test.go (renamed from tests/integration/api_actions_delete_run_test.go) | 38 | ||||
-rw-r--r-- | tests/integration/api_repo_edit_test.go | 3 | ||||
-rw-r--r-- | tests/integration/editor_test.go | 17 | ||||
-rw-r--r-- | tests/integration/repo_webhook_test.go | 79 |
9 files changed, 239 insertions, 60 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index 606c831bfd..63da471f9b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -37,7 +37,6 @@ Karl Heinz Marbaise <kama@soebes.de> (@khmarbaise) Norwin Roosen <git@nroo.de> (@noerw) Kyle Dumont <kdumontnu@gmail.com> (@kdumontnu) Janis Estelmann <admin@oldschoolhack.me> (@KN4CK3R) -Steven Kriegler <sk.bunsenbrenner@gmail.com> (@justusbunsi) Jimmy Praet <jimmy.praet@telenet.be> (@jpraet) Leon Hofmeister <dev.lh@web.de> (@delvh) Wim <wim@42.be> (@42wim) diff --git a/options/locale/locale_ga-IE.ini b/options/locale/locale_ga-IE.ini index 254817a52c..08c8eafb38 100644 --- a/options/locale/locale_ga-IE.ini +++ b/options/locale/locale_ga-IE.ini @@ -269,6 +269,7 @@ path=Cosán sqlite_helper=Conair comhad don bhunachar sonraí SQLite3. Cuir <br>isteach cosán iomlán má reáchtáil tú Gitea mar sheirbhís. reinstall_error=Tá tú ag iarraidh a shuiteáil i mbunachar sonraí Gitea atá ann cheana reinstall_confirm_message=Is féidir fadhbanna iolracha a bheith ina chúis le hathshuiteáil le bunachar sonraí Gitea I bhformhór na gcásanna, ba chóir duit an "app.ini" atá agat cheana a úsáid chun Gitea a reáchtáil. Má tá a fhios agat cad atá á dhéanamh agat, deimhnigh an méid seo a leanas: +reinstall_confirm_check_1=D’fhéadfadh sé go gcaillfí na sonraí atá criptithe ag an SECRET_KEY in app.ini: b’fhéidir nach mbeidh úsáideoirí in ann logáil isteach le 2FA/OTP agus b’fhéidir nach bhfeidhmeoidh scátháin i gceart. Tríd an mbosca seo a sheiceáil, dearbhaíonn tú go bhfuil an SECRET_KEY ceart sa chomhad app.ini reatha. reinstall_confirm_check_2=B’fhéidir go mbeadh gá na stórtha agus na socruithe a athshioncrónú. Trí tic a chur sa bhosca seo, deimhníonn tú go ndéanfaidh tú na crúcaí do na stórtha agus don chomhad authorized_keys a athshioncrónú de láimh. Deimhníonn tú go gcinnteoidh tú go bhfuil socruithe an stórtha agus an scátháin ceart. reinstall_confirm_check_3=Deimhníonn tú go bhfuil tú cinnte go bhfuil an Gitea seo ag rith leis an suíomh ceart app.ini agus go bhfuil tú cinnte go gcaithfidh tú athshuiteáil. Deimhníonn tú go n-admhaíonn tú na rioscaí thuas. err_empty_db_path=Ní féidir cosán bunachar sonraí SQLite3 a bheith folamh. @@ -2290,8 +2291,11 @@ settings.trust_model.collaborator=Comhoibritheoir settings.trust_model.collaborator.long=Comhoibritheoir: Sínithe muinín ag comhoibrithe settings.trust_model.collaborator.desc=Déanfar sínithe bailí ó chomhoibritheoirí an stórais seo a mharcáil mar "iontaofa", cibé acu a mheaitseálann siad an tiomnóir nó nach meaitseálann. Seachas sin, déanfar sínithe bailí a mharcáil mar "neamhiontaofa" má mheaitseálann an síniú an tiomnóir agus "gan mheaitseáil" mura bhfuil. settings.trust_model.committer=Coimisitheoir +settings.trust_model.committer.long=Tiomnaithe: Sínithe muiníne a mheaitseálann tiomnóirí. Meaitseálann sé seo iompar GitHub agus cuirfidh sé iallach ar thiomnóirí atá sínithe ag Gitea Gitea a bheith mar an tiomnóir. +settings.trust_model.committer.desc=Ní mharcálfar sínithe bailí mar "iontaofa" ach amháin má mheaitseálann siad an tiomnaí, nó marcálfar iad mar "gan mheaitseáil". Cuireann sé seo iallach ar Gitea a bheith ina tiomnaí ar thiomnuithe sínithe, agus an tiomnaí iarbhír marcáilte mar Chomhúdaraithe ag: agus Co-thiomnaithe ag: leantóir sa tiomnú. Caithfidh eochair réamhshocraithe Gitea a bheith ag teacht le húsáideoir sa bhunachar sonraí. settings.trust_model.collaboratorcommitter=Comhoibritheo+Coimiteoir settings.trust_model.collaboratorcommitter.long=Comhoibrí+Coiste: sínithe muiníne ó chomhoibrithe a mheaitseálann an tiomnóir +settings.trust_model.collaboratorcommitter.desc=Marcálfar sínithe bailí ó chomhoibritheoirí an stórais seo mar "iontaofa" má mheaitseálann siad an tiomnaí. Seachas sin, marcálfar sínithe bailí mar "neamhiontaofa" má mheaitseálann an síniú an tiomnaí agus "gan mheaitseáil" murach sin. Cuirfidh sé seo iallach ar Gitea a bheith marcáilte mar an tiomnaí ar thiomnuithe sínithe, agus an tiomnaí iarbhír marcáilte mar Chomhúdaraithe ag: agus Co-Tiomnaithe ag: leantóir sa tiomnú. Ní mór don eochair réamhshocraithe Gitea a bheith ag teacht le húsáideoir sa bhunachar sonraí. settings.wiki_delete=Scrios Sonraí Vicí settings.wiki_delete_desc=Tá sonraí wiki stóras a scriosadh buan agus ní féidir iad a chur ar ais. settings.wiki_delete_notices_1=- Scriosfaidh agus díchumasóidh sé seo an stóras vicí do %s go buan. @@ -2300,6 +2304,7 @@ settings.wiki_deletion_success=Scriosadh sonraí vicí an stórais. settings.delete=Scrios an Stóras seo settings.delete_desc=Tá scriosadh stóras buan agus ní féidir é a chealú. settings.delete_notices_1=- <strong>NÍ FÉIDIR</strong> an oibríocht seo a chealú. +settings.delete_notices_2=- Scriosfaidh an oibríocht seo an stórlann <strong>%s</strong> go buan, lena n-áirítear cód, saincheisteanna, tuairimí, sonraí vicí agus socruithe comhoibrithe. settings.delete_notices_fork_1=- Beidh forcanna den stóras seo neamhspleách tar éis iad a scriosadh. settings.deletion_success=Tá an stóras scriosta. settings.update_settings_success=Nuashonraíodh na socruithe stóras. @@ -2321,6 +2326,8 @@ settings.team_not_in_organization=Níl an fhoireann san eagraíocht chéanna lei settings.teams=Foirne settings.add_team=Cuir Foireann leis settings.add_team_duplicate=Tá an stóras ag an bhfoireann cheana féin +settings.add_team_success=Tá rochtain ag an bhfoireann ar an stóras anois. +settings.change_team_permission_tip=Tá cead na foirne socraithe ar leathanach socruithe na foirne agus ní féidir é a athrú in aghaidh an stórais settings.delete_team_tip=Tá rochtain ag an bhfoireann seo ar gach stórais agus ní féidir í a bhaint settings.remove_team_success=Tá rochtain na foirne ar an stóras bainte amach. settings.add_webhook=Cuir Crúca Gréasán leis @@ -2585,6 +2592,7 @@ settings.archive.tagsettings_unavailable=Níl socruithe clibeanna ar fáil má t settings.archive.mirrors_unavailable=Níl scátháin ar fáil má tá an stóras i gcartlann. settings.unarchive.button=Stóras gan cartlann settings.unarchive.header=Díchartlannaigh an stóras seo +settings.unarchive.text=Má dhíchartlannaítear an stóras, athbhunófar a chumas chun gealltanais agus brúnna a fháil, chomh maith le saincheisteanna nua agus iarratais tarraingthe. settings.unarchive.success=Rinneadh an stóras a dhíchartlann go rathúil. settings.unarchive.error=Tharla earráid agus tú ag iarraidh an stóras a dhíchartlannú. Féach an logáil le haghaidh tuilleadh sonraí. settings.update_avatar_success=Nuashonraíodh avatar an stóras. @@ -2602,9 +2610,11 @@ settings.lfs_invalid_locking_path=Cosan neamhbhailí: %s settings.lfs_invalid_lock_directory=Ní féidir eolaire a ghlasáil: %s settings.lfs_lock_already_exists=Tá an glas ann cheana féin: %s settings.lfs_lock=Glas +settings.lfs_lock_path=Cosán comhaid le glasáil… settings.lfs_locks_no_locks=Gan Glais settings.lfs_lock_file_no_exist=Níl an comhad faoi ghlas sa bhrainse réamhshocraithe settings.lfs_force_unlock=Díghlasáil Fórsa +settings.lfs_pointers.found=Fuarthas %d pointeoir(í) bloba — %d gaolmhar, %d neamhghaolmhar (%d ar iarraidh ón stóras) settings.lfs_pointers.sha=SHA Blob settings.lfs_pointers.oid=OID settings.lfs_pointers.inRepo=I Stóras @@ -2762,6 +2772,7 @@ branch.new_branch_from=`Cruthaigh brainse nua ó "%s"` branch.renamed=Ainmníodh brainse %s go %s. branch.rename_default_or_protected_branch_error=Ní féidir ach le riarthóirí brainsí réamhshocraithe nó cosanta a athainmniú. branch.rename_protected_branch_failed=Tá an brainse seo faoi chosaint ag rialacha cosanta domhanda. +branch.commits_divergence_from=Difríocht tiomantais: %[1]d taobh thiar agus %[2]d chun tosaigh ar %[3]s branch.commits_no_divergence=Mar an gcéanna le brainse %[1]s tag.create_tag=Cruthaigh clib %s @@ -2786,6 +2797,7 @@ error.csv.invalid_field_count=Ní féidir an comhad seo a rindreáil toisc go bh error.broken_git_hook=Is cosúil go bhfuil crúcaí git den stór seo briste. Lean an <a target="_blank" rel="noreferrer" href="%s">doiciméadúchán</a> chun iad a cheartú, ansin brúigh roinnt gealltanas chun an stádas a athnuachan. [graphs] +component_loading=Ag lódáil %s… component_loading_failed=Ní fhéadfaí %s a luchtú component_loading_info=Seans go dtógfaidh sé seo beagán… component_failed_to_load=Tharla earráid gan choinne. @@ -2824,6 +2836,7 @@ form.create_org_not_allowed=Níl cead agat eagraíocht a chruthú. settings=Socruithe settings.options=Eagraíocht settings.full_name=Ainm Iomlán +settings.email=Seoladh Ríomhphoist Teagmhála settings.website=Láithreán Gréasáin settings.location=Suíomh settings.permission=Ceadanna @@ -2840,7 +2853,10 @@ settings.update_setting_success=Nuashonraíodh socruithe eagraíochta. settings.rename=Athainmnigh an Eagraíocht settings.rename_desc=Má athraíonn tú ainm na heagraíochta, athrófar URL d’eagraíochta freisin agus saorfar an seanainm. +settings.rename_success=Athainmníodh an eagraíocht %[1]s go %[2]s go rathúil. +settings.rename_no_change=Níl ainm na heagraíochta athraithe. settings.rename_new_org_name=Ainm Nua na hEagraíochta +settings.rename_failed=Theip ar athainmniú na heagraíochta mar gheall ar earráid inmheánach settings.rename_notices_1=NÍ <strong>FÉIDIR</strong> an oibríocht seo a chealú. settings.rename_notices_2=Déanfar an seanainm a atreorú go dtí go n-éileofar é. @@ -2850,9 +2866,11 @@ settings.delete_account=Scrios an Eagraíocht seo settings.delete_prompt=Bainfear an eagraíocht go buan. <strong>NÍ FÉIDIR</strong> é seo a chealú! settings.name_confirm=Cuir isteach ainm na heagraíochta mar dheimhniú: settings.delete_notices_1=NÍ <strong>FÉIDIR</strong> an oibríocht seo a chealú. +settings.delete_notices_2=Scriosfaidh an oibríocht seo go buan gach <strong>stórais</strong> de chuid <strong>%s</strong>, lena n-áirítear cód, saincheisteanna, tuairimí, sonraí vicí agus socruithe comhoibritheora. settings.delete_notices_3=Scriosfaidh an oibríocht seo gach <strong>pacáiste</strong> de chuid <strong>%s</strong> go buan. settings.delete_notices_4=Scriosfaidh an oibríocht seo gach <strong>tionscadal</strong> de chuid <strong>%s</strong> go buan. settings.confirm_delete_account=Deimhnigh scriosadh +settings.delete_failed=Theip ar an eagraíocht a scriosadh mar gheall ar earráid inmheánach settings.delete_successful=Scriosadh an eagraíocht <b>%s</b> go rathúil. settings.hooks_desc=Cuir crúcaí gréasán in leis a spreagfar do <strong>gach stóras</strong> faoin eagraíocht seo. @@ -2909,6 +2927,7 @@ teams.remove_all_repos_title=Bain gach stórais foirne teams.remove_all_repos_desc=Bainfidh sé seo gach stórais ón bhfoireann. teams.add_all_repos_title=Cuir gach stórais leis teams.add_all_repos_desc=Cuirfidh sé seo stórais uile na heagraíochta leis an bhfoireann. +teams.add_nonexistent_repo=Níl an stóras atá tú ag iarraidh a chur leis ann. Cruthaigh í ar dtús le do thoil. teams.add_duplicate_users=Is ball foirne é an úsáideoir cheana féin. teams.repos.none=Ní raibh rochtain ag an bhfoireann seo ar aon stóras. teams.members.none=Níl aon bhaill ar an bhfoireann seo. @@ -2949,6 +2968,7 @@ repositories=Stórais hooks=Crúcaí Gréasán integrations=Comhtháthaithe authentication=Foinsí Fíordheimhnithe +emails=Seoltaí Ríomhphoist Úsáideoirí config=Cumraíocht config_summary=Achoimre config_settings=Socruithe @@ -2980,8 +3000,11 @@ dashboard.cron.cancelled=Cron: %[1]s cealaithe: %[3]s dashboard.cron.error=Earráid i gCron: %s: %[3]s dashboard.cron.finished=Cron: %[1]s críochnaithe dashboard.delete_inactive_accounts=Scrios gach cuntas neamhghníomhach +dashboard.delete_inactive_accounts.started=Cuireadh tús leis an tasc chun na cuntais dhíghníomhachtaithe go léir a scriosadh dashboard.delete_repo_archives=Scrios gach cartlann stórais (ZIP, TAR.GZ, srl.) +dashboard.delete_repo_archives.started=Cuireadh tús leis an tasc chun gach cartlann stórtha a scriosadh dashboard.delete_missing_repos=Scrios gach stóras atá in easnamh ar a gcuid comhad Git +dashboard.delete_missing_repos.started=Cuireadh tús leis an tasc chun na stórais uile a scriosadh nach bhfuil a gcomhaid Git iontu dashboard.delete_generated_repository_avatars=Scrios abhatáranna stórtha ginte dashboard.sync_repo_branches=Sync brainsí caillte ó shonraí git go bunachair sonraí dashboard.sync_repo_tags=Clibeanna sioncraigh ó shonraí git go bunachar sonraí @@ -2989,7 +3012,12 @@ dashboard.update_mirrors=Scátháin a nuashonrú dashboard.repo_health_check=Seiceáil sláinte gach stóras dashboard.check_repo_stats=Seiceáil gach staitisticí stórais dashboard.archive_cleanup=Scrios sean-chartlanna stórais +dashboard.deleted_branches_cleanup=Glan suas brainsí scriosta dashboard.update_migration_poster_id=Nuashonraigh ID póstaer imir +dashboard.git_gc_repos=Bailitheoir bruscair gach stórais +dashboard.resync_all_sshkeys=Nuashonraigh an comhad '.ssh/authorized_keys' le heochracha SSH Gitea +dashboard.resync_all_sshprincipals=Nuashonraigh an comhad '.ssh/authorized_principals' le príomhoidí SSH Gitea +dashboard.resync_all_hooks=Athshioncrónaigh crúcaí réamhghlactha, nuashonraithe agus iarghlactha na stórais uile dashboard.reinit_missing_repos=Aththosaigh gach stórais Git atá in easnamh a bhfuil taifid ann dóibh dashboard.sync_external_users=Sioncrónaigh sonraí úsáideoirí seachtracha dashboard.cleanup_hook_task_table=Glan suas an tábla hook_task @@ -3025,8 +3053,10 @@ dashboard.total_gc_pause=Sos Iomlán GC dashboard.last_gc_pause=Sos GC Deireanach dashboard.gc_times=Amanna GC dashboard.delete_old_actions=Scrios gach sean-ghníomhaíocht ón mbunachar +dashboard.delete_old_actions.started=Scriosadh na seanghníomhaíochtaí go léir ón mbunachar sonraí tosaithe dashboard.update_checker=Seiceoir nuashonraithe dashboard.delete_old_system_notices=Scrios gach seanfhógra córais ón mbunachar sonraí +dashboard.gc_lfs=Bailitheoir bruscair meitea-réada LFS dashboard.stop_zombie_tasks=Stad gníomhartha tascanna zombie dashboard.stop_endless_tasks=Stad gníomhartha tascanna gan deireadh dashboard.cancel_abandoned_jobs=Cealaigh gníomhartha poist tréigthe @@ -3050,6 +3080,7 @@ users.2fa=2FA users.repos=Stórais users.created=Cruthaithe users.last_login=Sínigh Isteach Deiridh +users.never_login=Ná Sínigh Isteach riamh users.send_register_notify=Seol Fógra um Chlárú Úsáideora users.new_success=Tá an cuntas úsáideora "%s" cruthaithe. users.edit=Eagar @@ -3076,6 +3107,7 @@ users.still_own_repo=Tá stórais amháin nó níos mó fós ag an úsáideoir s users.still_has_org=Is ball d'eagraíocht é an t-úsáideoir seo. Bain an t-úsáideoir ó aon eagraíochtaí ar dtús. users.purge=Úsáideoir a Ghlanadh users.purge_help=Scrios go héigeantach úsáideoir agus aon stórais, eagraíochtaí agus pacáistí atá faoi úinéireacht an úsáideora. Scriosfar gach trácht freisin. +users.still_own_packages=Tá pacáiste amháin nó níos mó fós ag an úsáideoir seo. Scrios na pacáistí seo ar dtús. users.deletion_success=Scriosadh an cuntas úsáideora. users.reset_2fa=Athshocraigh 2FA users.list_status_filter.menu_text=Scagaire @@ -3095,7 +3127,11 @@ users.details=Sonraí Úsáideora emails.email_manage_panel=Bainistíocht Ríomhphost Úsáideoir emails.primary=Bunscoile emails.activated=Gníomhachtaithe +emails.filter_sort.email=Seoladh ríomhphoist +emails.filter_sort.email_reverse=Seoladh ríomhphoist (droim ar ais) emails.filter_sort.name=Ainm úsáideora +emails.filter_sort.name_reverse=Ainm úsáideora (droim ar ais) +emails.updated=Seoladh ríomhphoist nuashonraithe emails.not_updated=Theip ar an seoladh ríomhphoist iarrtha a nuashonrú: %v emails.duplicate_active=Tá an seoladh ríomhphoist seo gníomhach cheana féin d'úsáideoir difriúil. emails.change_email_header=Nuashonraigh Airíonna Ríomhphoist @@ -3103,6 +3139,7 @@ emails.change_email_text=An bhfuil tú cinnte gur mhaith leat an seoladh ríomhp emails.delete=Scrios Ríomhphost emails.delete_desc=An bhfuil tú cinnte gur mhaith leat an seoladh ríomhphoist seo a scriosadh? emails.deletion_success=Tá an seoladh ríomhphoist scriosta. +emails.delete_primary_email_error=Ní féidir leat an príomhsheoladh ríomhphoist a scriosadh. orgs.org_manage_panel=Bainistíocht Eagraíochta orgs.name=Ainm @@ -3216,20 +3253,29 @@ auths.oauth2_required_claim_name_helper=Socraigh an t-ainm seo chun logáil iste auths.oauth2_required_claim_value=Luach Éilimh Riachtanach auths.oauth2_required_claim_value_helper=Socraigh an luach seo chun logáil isteach ón bhfoinse seo a shrianadh chuig úsáideoirí a bhfuil éileamh acu leis an ainm agus an luach seo auths.oauth2_group_claim_name=Ainm éileamh ag soláthar ainmneacha grúpa don fhoinse seo (Roghnach) +auths.oauth2_full_name_claim_name=Ainm Iomlán Éilimh Ainm. (Roghnach — má shocraítear é, déanfar ainm iomlán an úsáideora a shioncrónú leis an éileamh seo i gcónaí) auths.oauth2_ssh_public_key_claim_name=Ainm Éilimh Eochrach Phoiblí SSH +auths.oauth2_admin_group=Luach Éilimh Ghrúpa d'úsáideoirí riarthóra. (Roghnach — éilítear ainm an éilimh thuas) +auths.oauth2_restricted_group=Luach Éilimh Ghrúpa d'úsáideoirí srianta. (Roghnach — éilítear ainm an éilimh thuas) +auths.oauth2_map_group_to_team=Mapáil grúpaí éilithe chuig foirne Eagraíochta. (Roghnach — éilítear ainm an éilimh thuas) auths.oauth2_map_group_to_team_removal=Bain úsáideoirí ó fhoirne sioncronaithe mura mbaineann an t-úsáideoir leis an ngrúpa comhfhreagrach. auths.enable_auto_register=Cumasaigh Clárú Auto auths.sspi_auto_create_users=Cruthaigh úsáideoirí go huathoibríoch +auths.sspi_auto_create_users_helper=Ceadaigh don mhodh údaraithe SSPI cuntais nua a chruthú go huathoibríoch d'úsáideoirí a logálann isteach den chéad uair auths.sspi_auto_activate_users=Gníomhachtaigh úsáideoirí go huathoibríoch auths.sspi_auto_activate_users_helper=Lig modh auth SSPI úsáideoirí nua a ghníomhachtú go huathoibríoch auths.sspi_strip_domain_names=Bain ainmneacha fearann ó ainm úsáideora +auths.sspi_strip_domain_names_helper=Má tá sé seo seiceáilte, bainfear ainmneacha fearainn as ainmneacha logála isteach (m.sh. ní bheidh ach "úsáideoir" i gceist le "DOMAIN\user" agus "user@example.org"). auths.sspi_separator_replacement=Deighilteoir le húsáid in ionad\,/agus @ +auths.sspi_separator_replacement_helper=An carachtar le húsáid chun deighilteoirí ainmneacha logála isteach ar leibhéal níos ísle (m.sh. an \ i "DOMAIN\user") agus príomhainmneacha úsáideora (m.sh. an @ i "user@example.org") a athsholáthar. auths.sspi_default_language=Teanga úsáideora réamhshocraithe +auths.sspi_default_language_helper=Teanga réamhshocraithe d'úsáideoirí a chruthaítear go huathoibríoch ag modh údaraithe SSPI. Fág folamh más fearr leat go mbraithfí an teanga go huathoibríoch. auths.tips=Leideanna auths.tips.oauth2.general=OAuth2 Fíordheimhniú auths.tips.oauth2.general.tip=Agus fíordheimhniú OAuth2 nua á chlárú agat, ba chóir go mbeadh an URL glaonna ais/atreoraithe: auths.tip.oauth2_provider=Soláthraí OAuth2 auths.tip.bitbucket=Cláraigh tomhaltóir OAuth nua ar %s agus cuir an cead 'Cuntas' - 'Léigh' leis +auths.tip.nextcloud=Cláraigh tomhaltóir OAuth nua ar do chás trí "Socruithe -> Slándáil -> Cliant OAuth 2.0" a roghnú sa roghchlár auths.tip.dropbox=Cruthaigh feidhmchlár nua ag %s auths.tip.facebook=Cláraigh feidhmchlár nua ag %s agus cuir an táirge "Facebook Login" leis auths.tip.github=Cláraigh feidhmchlár OAuth nua ar %s @@ -3339,6 +3385,7 @@ config.mailer_sendmail_path=Cosán Sendmail config.mailer_sendmail_args=Argóintí Breise chuig Sendmail config.mailer_sendmail_timeout=Teorainn Ama Sendmail config.mailer_use_dummy=Caochadán +config.test_email_placeholder=Seoladh Ríomhphoist (m.sh. test@example.com) config.send_test_mail=Seol Ríomhphost Tástála config.send_test_mail_submit=Seol config.test_mail_failed=Theip ar ríomhphost tástála a sheoladh chuig "%s": %v @@ -3427,6 +3474,7 @@ monitor.queue.numberinqueue=Uimhir i scuaine monitor.queue.review_add=Athbhreithniú / Cuir Oibrithe leis monitor.queue.settings.title=Socruithe Linn monitor.queue.settings.desc=Fásann linnte go dinimiciúil mar fhreagra ar a gcuid scuaine oibrithe a bhlocáil. +monitor.queue.settings.maxnumberworkers=Uasmhéid líon na n-oibrithe monitor.queue.settings.maxnumberworkers.placeholder=Faoi láthair %[1]d monitor.queue.settings.maxnumberworkers.error=Caithfidh uaslíon na n-oibrithe a bheith ina uimhir monitor.queue.settings.submit=Nuashonrú Socruithe @@ -3452,6 +3500,10 @@ notices.delete_success=Scriosadh na fógraí córais. self_check.no_problem_found=Níor aimsíodh aon fhadhb fós. self_check.startup_warnings=Rabhadh tosaithe: self_check.database_collation_mismatch=Bí ag súil le comhthiomsú a úsáid sa bhunachar sonraí: %s +self_check.database_collation_case_insensitive=Tá an bunachar sonraí ag baint úsáide as an gcóimheas %s, arb é atá ann ná cóimheas neamhíogair ó thaobh cás de. Cé gur féidir le Gitea oibriú leis, d'fhéadfadh go mbeadh roinnt cásanna neamhchoitianta ann nach n-oibreoidh mar a bhíothas ag súil leis. +self_check.database_inconsistent_collation_columns=Tá an bunachar sonraí ag úsáid an chóimheasa %s, ach tá na colúin seo ag úsáid chóimheasa mí-oiriúnacha. D’fhéadfadh sé seo roinnt fadhbanna gan choinne a chruthú. +self_check.database_fix_mysql=I gcás úsáideoirí MySQL/MariaDB, d'fhéadfá an t-ordú "gitea doctor convert" a úsáid chun na fadhbanna cóimheasa a shocrú, nó d'fhéadfá an fhadhb a shocrú de láimh le fiosrúcháin SQL "ALTER ... COLLATE ...". +self_check.database_fix_mssql=I gcás úsáideoirí MSSQL, ní fhéadfá an fhadhb a réiteach de láimh ach le fiosrúcháin SQL "ALTER ... COLLATE ..." faoi láthair. self_check.location_origin_mismatch=Ní mheaitseálann an URL reatha (%[1]s) an URL atá le feiceáil ag Gitea (%[2]s). Má tá seachfhreastalaí droim ar ais á úsáid agat, cinntigh le do thoil go bhfuil na ceanntásca "Óstríomhaire" agus "X-Forwarded-Proto" socraithe i gceart. [action] @@ -3535,6 +3587,8 @@ error.no_committer_account=Níl aon chuntas nasctha le seoladh ríomhphoist an t error.no_gpg_keys_found=Níor aimsíodh aon eochair aithne don síniú seo sa bhunachar error.not_signed_commit=Ní tiomantas sínithe error.failed_retrieval_gpg_keys=Theip ar aisghabháil eochair ar bith a bhí ceangailte le cuntas an tiomnóra +error.probable_bad_signature=RABHADH! Cé go bhfuil eochair leis an ID seo sa bhunachar sonraí, ní fhíoraíonn sé an tiomantas seo! Tá AMHRASACH ar an tiomantas seo. +error.probable_bad_default_signature=RABHADH! Cé go bhfuil an ID seo ag an eochair réamhshocraithe, ní fhíoraíonn sé an tiomantas seo! Tá AMHRASACH ar an tiomantas seo. [units] unit=Aonad @@ -3573,6 +3627,7 @@ versions.view_all=Féach ar gach dependency.id=ID dependency.version=Leagan search_in_external_registry=Cuardaigh i %s +alpine.registry=Socraigh an clárlann seo tríd an URL a chur i do chomhad <code>/etc/apk/repositories</code>: alpine.registry.key=Íoslódáil eochair RSA poiblí na clárlainne isteach san fhillteán <code>/etc/apk/keys/</code> chun an síniú innéacs a fhíorú: alpine.registry.info=Roghnaigh $branch agus $repository ón liosta thíos. alpine.install=Chun an pacáiste a shuiteáil, rith an t-ordú seo a leanas: @@ -3585,13 +3640,18 @@ arch.install=Sioncronaigh pacáiste le pacman: arch.repository=Eolas Stórais arch.repository.repositories=Stórais arch.repository.architectures=Ailtireachtaí +cargo.registry=Socraigh an clárlann seo i gcomhad cumraíochta Cargo (mar shampla <code>~/.cargo/config.toml</code>): cargo.install=Chun an pacáiste a shuiteáil ag baint úsáide as Cargo, reáchtáil an t-ordú seo a leanas: +chef.registry=Socraigh an clárlann seo i do chomhad <code>~/.chef/config.rb</code>: chef.install=Chun an pacáiste a shuiteáil, rith an t-ordú seo a leanas: +composer.registry=Socraigh an chlár seo i do chomhad <code>~/.composer/config.json</code>: composer.install=Chun an pacáiste a shuiteáil ag baint úsáide as Cumadóir, reáchtáil an t-ordú seo a leanas: composer.dependencies=Spleithiúlachtaí composer.dependencies.development=Spleithiúlachtaí Forbartha conan.details.repository=Stóras +conan.registry=Socraigh an clárlann seo ón líne ordaithe: conan.install=Chun an pacáiste a shuiteáil ag úsáid Conan, reáchtáil an t-ordú seo a leanas: +conda.registry=Socraigh an clárlann seo mar stóras Conda i do chomhad <code>.condarc</code>: conda.install=Chun an pacáiste a shuiteáil ag úsáid Conda, reáchtáil an t-ordú seo a leanas: container.details.type=Cineál Íomhá container.details.platform=Ardán @@ -3603,7 +3663,9 @@ container.layers=Sraitheanna Íomhá container.labels=Lipéid container.labels.key=Eochair container.labels.value=Luach +cran.registry=Socraigh an chlárlann seo i do chomhad <code>Rprofile.site</code>: cran.install=Chun an pacáiste a shuiteáil, rith an t-ordú seo a leanas: +debian.registry=Socraigh an clárlann seo ón líne ordaithe: debian.registry.info=Roghnaigh $distribution agus $component ón liosta thíos. debian.install=Chun an pacáiste a shuiteáil, rith an t-ordú seo a leanas: debian.repository=Eolas Stóras @@ -3612,11 +3674,16 @@ debian.repository.components=Comhpháirteanna debian.repository.architectures=Ailtireachtaí generic.download=Íoslódáil pacáiste ón líne ordaithe: go.install=Suiteáil an pacáiste ón líne ordaithe: +helm.registry=Socraigh an clárlann seo ón líne ordaithe: helm.install=Chun an pacáiste a shuiteáil, rith an t-ordú seo a leanas: +maven.registry=Socraigh an clárlann seo i do chomhad <code>pom.xml</code> tionscadail: +maven.install=Chun an pacáiste a úsáid, cuir an méid seo a leanas san áireamh sa bhloc <code>dependencies</code> sa chomhad <code>pom.xml</code>: maven.install2=Rith tríd an líne ordaithe: maven.download=Chun an spleáchas a íoslódáil, rith tríd an líne ordaithe: +nuget.registry=Socraigh an clárlann seo ón líne ordaithe: nuget.install=Chun an pacáiste a shuiteáil ag úsáid NuGet, reáchtáil an t-ordú seo a leanas: nuget.dependency.framework=Spriocchreat +npm.registry=Socraigh an chlárlann seo i do chomhad <code>.npmrc</code> do thionscadail: npm.install=Chun an pacáiste a shuiteáil ag úsáid npm, reáchtáil an t-ordú seo a leanas: npm.install2=nó cuir leis an gcomhad package.json é: npm.dependencies=Spleithiúlachtaí @@ -3628,6 +3695,7 @@ npm.details.tag=Clib pub.install=Chun an pacáiste a shuiteáil ag úsáid Dart, reáchtáil an t-ordú seo a leanas: pypi.requires=Teastaíonn Python pypi.install=Chun an pacáiste a shuiteáil ag úsáid pip, reáchtáil an t-ordú seo a leanas: +rpm.registry=Socraigh an clárlann seo ón líne ordaithe: rpm.distros.redhat=ar dháileadh bunaithe ar RedHat rpm.distros.suse=ar dháileadh bunaithe ar SUSE rpm.install=Chun an pacáiste a shuiteáil, rith an t-ordú seo a leanas: @@ -3640,6 +3708,7 @@ rubygems.dependencies.runtime=Spleáchais Rith-Ama rubygems.dependencies.development=Spleáchais Forbartha rubygems.required.ruby=Éilíonn leagan Ruby rubygems.required.rubygems=Éilíonn leagan RubyGem +swift.registry=Socraigh an clárlann seo ón líne ordaithe: swift.install=Cuir an pacáiste i do <code>chomhad Package.swift</code>: swift.install2=agus reáchtáil an t-ordú seo a leanas: vagrant.install=Chun bosca Vagrant a chur leis, reáchtáil an t-ordú seo a leanas: diff --git a/options/locale/locale_ja-JP.ini b/options/locale/locale_ja-JP.ini index 8d33d0e642..312e0dd4f1 100644 --- a/options/locale/locale_ja-JP.ini +++ b/options/locale/locale_ja-JP.ini @@ -679,7 +679,7 @@ unfollow=フォロー解除 user_bio=経歴 disabled_public_activity=このユーザーはアクティビティ表示を公開していません。 email_visibility.limited=あなたのメールアドレスはすべての認証済みユーザーに表示されています -email_visibility.private=あなたのメールアドレスは、あなたと管理者のみに表示されます +email_visibility.private=あなたのメールアドレスは、あなたと管理者にのみ表示されます show_on_map=地図上にこの場所を表示 settings=ユーザー設定 @@ -1021,14 +1021,16 @@ email_notifications.onmention=メンションのみメール通知 email_notifications.disable=メール通知無効 email_notifications.submit=メール設定を保存 email_notifications.andyourown=自分に関する通知も含める +email_notifications.actions.desc=<a target="_blank" href="%s">Gitea Actions</a>が設定されたリポジトリのワークフロー実行に関する通知。 +email_notifications.actions.failure_only=失敗したワークフロー実行についてのみ通知 visibility=ユーザーの公開範囲 visibility.public=パブリック visibility.public_tooltip=全員に表示されます visibility.limited=限定 -visibility.limited_tooltip=認証されたユーザーのみに表示されます +visibility.limited_tooltip=認証されたユーザーにのみ表示されます visibility.private=プライベート -visibility.private_tooltip=あなたが参加した組織のメンバーのみに表示されます +visibility.private_tooltip=あなたが参加した組織のメンバーにのみ表示されます [repo] new_repo_helper=リポジトリには、プロジェクトのすべてのファイルとリビジョン履歴が入ります。 すでにほかの場所でホストしていますか? <a href="%s">リポジトリを移行</a> もどうぞ。 @@ -2165,6 +2167,7 @@ settings.collaboration.write=書き込み settings.collaboration.read=読み取り settings.collaboration.owner=オーナー settings.collaboration.undefined=未定義 +settings.collaboration.per_unit=ユニット権限 settings.hooks=Webhook settings.githooks=Gitフック settings.basic_settings=基本設定 @@ -2318,7 +2321,7 @@ settings.collaborator_deletion=共同作業者の削除 settings.collaborator_deletion_desc=共同作業者を削除し、このリポジトリへのアクセス権を取り消します。 続行しますか? settings.remove_collaborator_success=共同作業者を削除しました。 settings.org_not_allowed_to_be_collaborator=組織を共同作業者として追加することはできません。 -settings.change_team_access_not_allowed=リポジトリに対するチームアクセス権の変更は、組織のオーナーのみに制限されています。 +settings.change_team_access_not_allowed=リポジトリに対するチームアクセス権の変更は、組織のオーナーにのみ制限されています。 settings.team_not_in_organization=チームがリポジトリと同じ組織に属していません。 settings.teams=チーム settings.add_team=チームを追加 @@ -2569,7 +2572,7 @@ settings.matrix.message_type=メッセージ種別 settings.visibility.private.button=プライベートにする settings.visibility.private.text=プライベートに変更することで、リポジトリは許可されたメンバーにのみ表示されるようになり、既存のフォーク、ウォッチャー、スターとの関係は解除される可能性があります。 settings.visibility.private.bullet_title=<strong>プライベートに変更すると:</strong> -settings.visibility.private.bullet_one=許可されたメンバーのみにリポジトリを表示します。 +settings.visibility.private.bullet_one=許可されたメンバーにのみリポジトリを表示します。 settings.visibility.private.bullet_two=<strong>フォーク</strong>、<strong>ウォッチャー</strong>、<strong>スター</strong>との関係を解除する可能性があります。 settings.visibility.public.button=公開する settings.visibility.public.text=公開に変更すると、リポジトリを誰でも閲覧できるようにします。 @@ -2769,6 +2772,8 @@ branch.new_branch_from=`"%s" から新しいブランチを作成` branch.renamed=ブランチ %s は %s にリネームされました。 branch.rename_default_or_protected_branch_error=デフォルトブランチや保護ブランチのリネームが可能なのは管理者だけです。 branch.rename_protected_branch_failed=このブランチはglobベースの保護ルールに従って保護されています。 +branch.commits_divergence_from=コミットの乖離: %[3]s より %[1]d 件遅れ %[2]d 件先行 +branch.commits_no_divergence=%[1]s ブランチと一致 tag.create_tag=タグ %s を作成 tag.create_tag_operation=タグの作成 @@ -2782,6 +2787,7 @@ topic.done=完了 topic.count_prompt=選択できるのは25トピックまでです。 topic.format_prompt=トピック名は英字または数字で始め、ダッシュ('-')やドット('.')を含めることができます。最大35文字までです。文字は小文字でなければなりません。 +find_file.follow_symlink=シンボリックリンクが指し示す先を開く find_file.go_to_file=ファイルへ移動 find_file.no_matching=一致するファイルが見つかりません @@ -3247,6 +3253,8 @@ auths.oauth2_required_claim_name_helper=このClaim名を設定すると、こ auths.oauth2_required_claim_value=必須Claim値 auths.oauth2_required_claim_value_helper=この値を設定すると、このソースからのログインを、指定したClaim名とClaim値を持つユーザーに限定します。 auths.oauth2_group_claim_name=このソースでグループ名を提供するClaim名 (オプション) +auths.oauth2_full_name_claim_name=フルネームのClaim名。 (オプション — 設定すると、ユーザーのフルネームは常にこのClaimに同期します) +auths.oauth2_ssh_public_key_claim_name=SSH公開鍵のClaim名 auths.oauth2_admin_group=管理者ユーザーのグループClaim値 (オプション — 上のClaim名が必要) auths.oauth2_restricted_group=制限付きユーザーのグループClaim値 (オプション — 上のClaim名が必要) auths.oauth2_map_group_to_team=見つかったグループを組織のチームにマップ (オプション — 上のClaim名が必要) diff --git a/routers/api/v1/repo/action.go b/routers/api/v1/repo/action.go index 99eef2f53b..25aabe6dd2 100644 --- a/routers/api/v1/repo/action.go +++ b/routers/api/v1/repo/action.go @@ -1132,18 +1132,23 @@ func GetWorkflowRun(ctx *context.APIContext) { // "$ref": "#/responses/notFound" runID := ctx.PathParamInt64("run") - job, _, err := db.GetByID[actions_model.ActionRun](ctx, runID) + job, has, err := db.GetByID[actions_model.ActionRun](ctx, runID) + if err != nil { + ctx.APIErrorInternal(err) + return + } - if err != nil || job.RepoID != ctx.Repo.Repository.ID { - ctx.APIError(http.StatusNotFound, util.ErrNotExist) + if !has || job.RepoID != ctx.Repo.Repository.ID { + ctx.APIErrorNotFound(util.ErrNotExist) + return } - convertedArtifact, err := convert.ToActionWorkflowRun(ctx, ctx.Repo.Repository, job) + convertedRun, err := convert.ToActionWorkflowRun(ctx, ctx.Repo.Repository, job) if err != nil { ctx.APIErrorInternal(err) return } - ctx.JSON(http.StatusOK, convertedArtifact) + ctx.JSON(http.StatusOK, convertedRun) } // ListWorkflowRunJobs Lists all jobs for a workflow run. @@ -1237,10 +1242,15 @@ func GetWorkflowJob(ctx *context.APIContext) { // "$ref": "#/responses/notFound" jobID := ctx.PathParamInt64("job_id") - job, _, err := db.GetByID[actions_model.ActionRunJob](ctx, jobID) + job, has, err := db.GetByID[actions_model.ActionRunJob](ctx, jobID) + if err != nil { + ctx.APIErrorInternal(err) + return + } - if err != nil || job.RepoID != ctx.Repo.Repository.ID { - ctx.APIError(http.StatusNotFound, util.ErrNotExist) + if !has || job.RepoID != ctx.Repo.Repository.ID { + ctx.APIErrorNotFound(util.ErrNotExist) + return } convertedWorkflowJob, err := convert.ToActionWorkflowJob(ctx, ctx.Repo.Repository, nil, job) @@ -1251,7 +1261,7 @@ func GetWorkflowJob(ctx *context.APIContext) { ctx.JSON(http.StatusOK, convertedWorkflowJob) } -// GetArtifacts Lists all artifacts for a repository. +// GetArtifactsOfRun Lists all artifacts for a repository. func GetArtifactsOfRun(ctx *context.APIContext) { // swagger:operation GET /repos/{owner}/{repo}/actions/runs/{run}/artifacts repository getArtifactsOfRun // --- @@ -1354,7 +1364,7 @@ func DeleteActionRun(ctx *context.APIContext) { runID := ctx.PathParamInt64("run") run, err := actions_model.GetRunByRepoAndID(ctx, ctx.Repo.Repository.ID, runID) if errors.Is(err, util.ErrNotExist) { - ctx.APIError(http.StatusNotFound, err) + ctx.APIErrorNotFound(err) return } else if err != nil { ctx.APIErrorInternal(err) diff --git a/routers/api/v1/repo/repo.go b/routers/api/v1/repo/repo.go index 4b88ed0b78..7b3858ccb1 100644 --- a/routers/api/v1/repo/repo.go +++ b/routers/api/v1/repo/repo.go @@ -772,13 +772,8 @@ func updateRepoUnits(ctx *context.APIContext, opts api.EditRepoOption) error { var units []repo_model.RepoUnit var deleteUnitTypes []unit_model.Type - currHasIssues := repo.UnitEnabled(ctx, unit_model.TypeIssues) - newHasIssues := currHasIssues if opts.HasIssues != nil { - newHasIssues = *opts.HasIssues - } - if currHasIssues || newHasIssues { - if newHasIssues && opts.ExternalTracker != nil && !unit_model.TypeExternalTracker.UnitGlobalDisabled() { + if *opts.HasIssues && opts.ExternalTracker != nil && !unit_model.TypeExternalTracker.UnitGlobalDisabled() { // Check that values are valid if !validation.IsValidExternalURL(opts.ExternalTracker.ExternalTrackerURL) { err := errors.New("External tracker URL not valid") @@ -802,7 +797,7 @@ func updateRepoUnits(ctx *context.APIContext, opts api.EditRepoOption) error { }, }) deleteUnitTypes = append(deleteUnitTypes, unit_model.TypeIssues) - } else if newHasIssues && opts.ExternalTracker == nil && !unit_model.TypeIssues.UnitGlobalDisabled() { + } else if *opts.HasIssues && opts.ExternalTracker == nil && !unit_model.TypeIssues.UnitGlobalDisabled() { // Default to built-in tracker var config *repo_model.IssuesConfig @@ -829,7 +824,7 @@ func updateRepoUnits(ctx *context.APIContext, opts api.EditRepoOption) error { Config: config, }) deleteUnitTypes = append(deleteUnitTypes, unit_model.TypeExternalTracker) - } else if !newHasIssues { + } else if !*opts.HasIssues { if !unit_model.TypeExternalTracker.UnitGlobalDisabled() { deleteUnitTypes = append(deleteUnitTypes, unit_model.TypeExternalTracker) } @@ -839,13 +834,8 @@ func updateRepoUnits(ctx *context.APIContext, opts api.EditRepoOption) error { } } - currHasWiki := repo.UnitEnabled(ctx, unit_model.TypeWiki) - newHasWiki := currHasWiki if opts.HasWiki != nil { - newHasWiki = *opts.HasWiki - } - if currHasWiki || newHasWiki { - if newHasWiki && opts.ExternalWiki != nil && !unit_model.TypeExternalWiki.UnitGlobalDisabled() { + if *opts.HasWiki && opts.ExternalWiki != nil && !unit_model.TypeExternalWiki.UnitGlobalDisabled() { // Check that values are valid if !validation.IsValidExternalURL(opts.ExternalWiki.ExternalWikiURL) { err := errors.New("External wiki URL not valid") @@ -861,7 +851,7 @@ func updateRepoUnits(ctx *context.APIContext, opts api.EditRepoOption) error { }, }) deleteUnitTypes = append(deleteUnitTypes, unit_model.TypeWiki) - } else if newHasWiki && opts.ExternalWiki == nil && !unit_model.TypeWiki.UnitGlobalDisabled() { + } else if *opts.HasWiki && opts.ExternalWiki == nil && !unit_model.TypeWiki.UnitGlobalDisabled() { config := &repo_model.UnitConfig{} units = append(units, repo_model.RepoUnit{ RepoID: repo.ID, @@ -869,7 +859,7 @@ func updateRepoUnits(ctx *context.APIContext, opts api.EditRepoOption) error { Config: config, }) deleteUnitTypes = append(deleteUnitTypes, unit_model.TypeExternalWiki) - } else if !newHasWiki { + } else if !*opts.HasWiki { if !unit_model.TypeExternalWiki.UnitGlobalDisabled() { deleteUnitTypes = append(deleteUnitTypes, unit_model.TypeExternalWiki) } @@ -879,13 +869,8 @@ func updateRepoUnits(ctx *context.APIContext, opts api.EditRepoOption) error { } } - currHasPullRequests := repo.UnitEnabled(ctx, unit_model.TypePullRequests) - newHasPullRequests := currHasPullRequests - if opts.HasPullRequests != nil { - newHasPullRequests = *opts.HasPullRequests - } - if currHasPullRequests || newHasPullRequests { - if newHasPullRequests && !unit_model.TypePullRequests.UnitGlobalDisabled() { + if opts.HasPullRequests != nil && !unit_model.TypePullRequests.UnitGlobalDisabled() { + if *opts.HasPullRequests { // We do allow setting individual PR settings through the API, so // we get the config settings and then set them // if those settings were provided in the opts. @@ -953,18 +938,13 @@ func updateRepoUnits(ctx *context.APIContext, opts api.EditRepoOption) error { Type: unit_model.TypePullRequests, Config: config, }) - } else if !newHasPullRequests && !unit_model.TypePullRequests.UnitGlobalDisabled() { + } else { deleteUnitTypes = append(deleteUnitTypes, unit_model.TypePullRequests) } } - currHasProjects := repo.UnitEnabled(ctx, unit_model.TypeProjects) - newHasProjects := currHasProjects - if opts.HasProjects != nil { - newHasProjects = *opts.HasProjects - } - if currHasProjects || newHasProjects { - if newHasProjects && !unit_model.TypeProjects.UnitGlobalDisabled() { + if opts.HasProjects != nil && !unit_model.TypeProjects.UnitGlobalDisabled() { + if *opts.HasProjects { unit, err := repo.GetUnit(ctx, unit_model.TypeProjects) var config *repo_model.ProjectsConfig if err != nil { @@ -984,7 +964,7 @@ func updateRepoUnits(ctx *context.APIContext, opts api.EditRepoOption) error { Type: unit_model.TypeProjects, Config: config, }) - } else if !newHasProjects && !unit_model.TypeProjects.UnitGlobalDisabled() { + } else { deleteUnitTypes = append(deleteUnitTypes, unit_model.TypeProjects) } } diff --git a/tests/integration/api_actions_delete_run_test.go b/tests/integration/api_actions_run_test.go index 5b41702c57..a0292f8f8b 100644 --- a/tests/integration/api_actions_delete_run_test.go +++ b/tests/integration/api_actions_run_test.go @@ -18,6 +18,44 @@ import ( "github.com/stretchr/testify/assert" ) +func TestAPIActionsGetWorkflowRun(t *testing.T) { + defer prepareTestEnvActionsArtifacts(t)() + + repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 2}) + user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) + session := loginUser(t, user.Name) + token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) + + req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/actions/runs/802802", repo.FullName())). + AddTokenAuth(token) + MakeRequest(t, req, http.StatusNotFound) + req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/actions/runs/802", repo.FullName())). + AddTokenAuth(token) + MakeRequest(t, req, http.StatusNotFound) + req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/actions/runs/803", repo.FullName())). + AddTokenAuth(token) + MakeRequest(t, req, http.StatusOK) +} + +func TestAPIActionsGetWorkflowJob(t *testing.T) { + defer prepareTestEnvActionsArtifacts(t)() + + repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 2}) + user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) + session := loginUser(t, user.Name) + token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository) + + req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/actions/jobs/198198", repo.FullName())). + AddTokenAuth(token) + MakeRequest(t, req, http.StatusNotFound) + req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/actions/jobs/198", repo.FullName())). + AddTokenAuth(token) + MakeRequest(t, req, http.StatusOK) + req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/actions/jobs/196", repo.FullName())). + AddTokenAuth(token) + MakeRequest(t, req, http.StatusNotFound) +} + func TestAPIActionsDeleteRunCheckPermission(t *testing.T) { defer prepareTestEnvActionsArtifacts(t)() diff --git a/tests/integration/api_repo_edit_test.go b/tests/integration/api_repo_edit_test.go index 7de8910ee0..e228da26e9 100644 --- a/tests/integration/api_repo_edit_test.go +++ b/tests/integration/api_repo_edit_test.go @@ -53,9 +53,8 @@ func getRepoEditOptionFromRepo(repo *repo_model.Repository) *api.EditRepoOption hasWiki = true } else if unit, err := repo.GetUnit(db.DefaultContext, unit_model.TypeExternalWiki); err == nil { hasWiki = true - config := unit.ExternalWikiConfig() externalWiki = &api.ExternalWiki{ - ExternalWikiURL: config.ExternalWikiURL, + ExternalWikiURL: unit.ExternalWikiConfig().ExternalWikiURL, } } defaultBranch := repo.DefaultBranch diff --git a/tests/integration/editor_test.go b/tests/integration/editor_test.go index ac1fb2abff..8c45d8881c 100644 --- a/tests/integration/editor_test.go +++ b/tests/integration/editor_test.go @@ -56,7 +56,7 @@ func TestEditor(t *testing.T) { func testEditorCreateFile(t *testing.T) { session := loginUser(t, "user2") - testCreateFile(t, session, "user2", "repo1", "master", "test.txt", "Content") + testCreateFile(t, session, "user2", "repo1", "master", "", "test.txt", "Content") testEditorActionPostRequestError(t, session, "/user2/repo1/_new/master/", map[string]string{ "tree_path": "test.txt", "commit_choice": "direct", @@ -69,11 +69,16 @@ func testEditorCreateFile(t *testing.T) { }, `Branch "master" already exists in this repository.`) } -func testCreateFile(t *testing.T, session *TestSession, user, repo, branch, filePath, content string) { - testEditorActionEdit(t, session, user, repo, "_new", branch, "", map[string]string{ - "tree_path": filePath, - "content": content, - "commit_choice": "direct", +func testCreateFile(t *testing.T, session *TestSession, user, repo, baseBranchName, newBranchName, filePath, content string) { + commitChoice := "direct" + if newBranchName != "" && newBranchName != baseBranchName { + commitChoice = "commit-to-new-branch" + } + testEditorActionEdit(t, session, user, repo, "_new", baseBranchName, "", map[string]string{ + "tree_path": filePath, + "content": content, + "commit_choice": commitChoice, + "new_branch_name": newBranchName, }) } diff --git a/tests/integration/repo_webhook_test.go b/tests/integration/repo_webhook_test.go index 1da7bc9d3c..f1abac8cfa 100644 --- a/tests/integration/repo_webhook_test.go +++ b/tests/integration/repo_webhook_test.go @@ -19,8 +19,10 @@ import ( user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/models/webhook" "code.gitea.io/gitea/modules/commitstatus" + "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/gitrepo" "code.gitea.io/gitea/modules/json" + "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" webhook_module "code.gitea.io/gitea/modules/webhook" "code.gitea.io/gitea/tests" @@ -365,7 +367,7 @@ func Test_WebhookPush(t *testing.T) { testAPICreateWebhookForRepo(t, session, "user2", "repo1", provider.URL(), "push") // 2. trigger the webhook - testCreateFile(t, session, "user2", "repo1", "master", "test_webhook_push.md", "# a test file for webhook push") + testCreateFile(t, session, "user2", "repo1", "master", "", "test_webhook_push.md", "# a test file for webhook push") // 3. validate the webhook is triggered assert.Equal(t, "push", triggeredEvent) @@ -398,21 +400,90 @@ func Test_WebhookPushDevBranch(t *testing.T) { testAPICreateWebhookForRepo(t, session, "user2", "repo1", provider.URL(), "push", "develop") // 2. this should not trigger the webhook - testCreateFile(t, session, "user2", "repo1", "master", "test_webhook_push.md", "# a test file for webhook push") + testCreateFile(t, session, "user2", "repo1", "master", "", "test_webhook_push.md", "# a test file for webhook push") assert.Empty(t, triggeredEvent) assert.Empty(t, payloads) + repo1 := unittest.AssertExistsAndLoadBean(t, &repo.Repository{ID: 1}) + gitRepo, err := gitrepo.OpenRepository(t.Context(), repo1) + assert.NoError(t, err) + defer gitRepo.Close() + + beforeCommitID, err := gitRepo.GetBranchCommitID("develop") + assert.NoError(t, err) + // 3. trigger the webhook - testCreateFile(t, session, "user2", "repo1", "develop", "test_webhook_push.md", "# a test file for webhook push") + testCreateFile(t, session, "user2", "repo1", "develop", "", "test_webhook_push.md", "# a test file for webhook push") + + afterCommitID, err := gitRepo.GetBranchCommitID("develop") + assert.NoError(t, err) // 4. validate the webhook is triggered assert.Equal(t, "push", triggeredEvent) assert.Len(t, payloads, 1) + assert.Equal(t, "refs/heads/develop", payloads[0].Ref) + assert.Equal(t, beforeCommitID, payloads[0].Before) + assert.Equal(t, afterCommitID, payloads[0].After) assert.Equal(t, "repo1", payloads[0].Repo.Name) assert.Equal(t, "develop", payloads[0].Branch()) assert.Equal(t, "user2/repo1", payloads[0].Repo.FullName) assert.Len(t, payloads[0].Commits, 1) + assert.Equal(t, afterCommitID, payloads[0].Commits[0].ID) + assert.Equal(t, setting.AppURL+"user2/repo1/compare/"+beforeCommitID+"..."+afterCommitID, payloads[0].CompareURL) + assert.Equal(t, []string{"test_webhook_push.md"}, payloads[0].Commits[0].Added) + assert.Empty(t, payloads[0].Commits[0].Removed) + }) +} + +func Test_WebhookPushToNewBranch(t *testing.T) { + var payloads []api.PushPayload + var triggeredEvent string + provider := newMockWebhookProvider(func(r *http.Request) { + content, _ := io.ReadAll(r.Body) + var payload api.PushPayload + err := json.Unmarshal(content, &payload) + assert.NoError(t, err) + payloads = append(payloads, payload) + triggeredEvent = "push" + }, http.StatusOK) + defer provider.Close() + + onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { + // 1. create a new webhook with special webhook for repo1 + session := loginUser(t, "user2") + + // only for dev branch + testAPICreateWebhookForRepo(t, session, "user2", "repo1", provider.URL(), "push", "new_branch") + + repo1 := unittest.AssertExistsAndLoadBean(t, &repo.Repository{ID: 1}) + gitRepo, err := gitrepo.OpenRepository(t.Context(), repo1) + assert.NoError(t, err) + defer gitRepo.Close() + + beforeCommitID, err := gitRepo.GetBranchCommitID("master") + assert.NoError(t, err) + + // 2. trigger the webhook + testCreateFile(t, session, "user2", "repo1", "master", "new_branch", "test_webhook_push.md", "# a new push from new branch") + + afterCommitID, err := gitRepo.GetBranchCommitID("new_branch") + assert.NoError(t, err) + emptyCommitID := git.Sha1ObjectFormat.EmptyObjectID().String() + + // 4. validate the webhook is triggered + assert.Equal(t, "push", triggeredEvent) + assert.Len(t, payloads, 1) + assert.Equal(t, "refs/heads/new_branch", payloads[0].Ref) + assert.Equal(t, emptyCommitID, payloads[0].Before) + assert.Equal(t, afterCommitID, payloads[0].After) + assert.Equal(t, "repo1", payloads[0].Repo.Name) + assert.Equal(t, "new_branch", payloads[0].Branch()) + assert.Equal(t, "user2/repo1", payloads[0].Repo.FullName) + assert.Len(t, payloads[0].Commits, 1) + assert.Equal(t, afterCommitID, payloads[0].Commits[0].ID) + assert.Equal(t, setting.AppURL+"user2/repo1/compare/"+beforeCommitID+"..."+afterCommitID, payloads[0].CompareURL) assert.Equal(t, []string{"test_webhook_push.md"}, payloads[0].Commits[0].Added) + assert.Empty(t, payloads[0].Commits[0].Removed) }) } @@ -878,7 +949,7 @@ func Test_WebhookStatus_NoWrongTrigger(t *testing.T) { testCreateWebhookForRepo(t, session, "gitea", "user2", "repo1", provider.URL(), "push_only") // 2. trigger the webhook with a push action - testCreateFile(t, session, "user2", "repo1", "master", "test_webhook_push.md", "# a test file for webhook push") + testCreateFile(t, session, "user2", "repo1", "master", "", "test_webhook_push.md", "# a test file for webhook push") // 3. validate the webhook is triggered with right event assert.Equal(t, "push", trigger) |