From 8421fd46441f18a33063c1fb1001a676293a5986 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Dachary?= Date: Tue, 14 Mar 2023 22:17:59 +0100 Subject: [PATCH 1/3] docs: push-options: use main instead of master Closes: https://codeberg.org/forgejo/website/issues/183 --- v1.19/user/push-options.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v1.19/user/push-options.md b/v1.19/user/push-options.md index 46a846fd..fc2942c5 100644 --- a/v1.19/user/push-options.md +++ b/v1.19/user/push-options.md @@ -16,5 +16,5 @@ There is support for some [push options](https://git-scm.com/docs/git-push#Docum Example of changing a repository's visibility to public: ```shell -git push -o repo.private=false -u origin master +git push -o repo.private=false -u origin main ``` From 766f2e16260aef65e449c242649302562e237a4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Dachary?= Date: Tue, 14 Mar 2023 22:18:54 +0100 Subject: [PATCH 2/3] docs: add push-to-create documentation Closes: https://codeberg.org/forgejo/website/issues/182 --- v1.19/user/index.md | 1 + v1.19/user/push-to-create.md | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 v1.19/user/push-to-create.md diff --git a/v1.19/user/index.md b/v1.19/user/index.md index 180836c0..fa15e6bb 100644 --- a/v1.19/user/index.md +++ b/v1.19/user/index.md @@ -37,6 +37,7 @@ involved in running it on their machines. - [API Reference](https://codeberg.org/api/swagger) - [Migrating Repositories](https://docs.codeberg.org/advanced/migrating-repos/) - [Push Options](push-options) + - [Push to create](push-to-create) - [Agit setup](agit-support) - See also - [Codeberg guide on Git](https://docs.codeberg.org/git/) diff --git a/v1.19/user/push-to-create.md b/v1.19/user/push-to-create.md new file mode 100644 index 00000000..e2e48dc0 --- /dev/null +++ b/v1.19/user/push-to-create.md @@ -0,0 +1,32 @@ +--- +layout: '~/layouts/Markdown.astro' +title: 'Push Options' +license: 'Apache-2.0' +origin_url: 'https://github.com/go-gitea/gitea/blob/6e75739c5ba1de30c37adbd9e590674b583912c2/docs/content/doc/usage/push-to-create.en-us.md' +--- + +# Push To Create + +Push to create is a feature that allows you to push to a repository that does not exist yet in Forgejo. This is useful for automation and for allowing users to create repositories without having to go through the web interface. This feature is disabled by default. + +## Enabling Push To Create + +In the `app.ini` file, set `ENABLE_PUSH_CREATE_USER` to `true` and `ENABLE_PUSH_CREATE_ORG` to `true` if you want to allow users to create repositories in their own user account and in organizations they are a member of respectively. Restart Forgejo for the changes to take effect. You can read more about these two options in the Configuration Cheat Sheet. + +## Using Push To Create + +Assuming you have a git repository in the current directory, you can push to a repository that does not exist yet in Forgejo by running the following command: + +```shell +# Add the remote you want to push to +git remote add origin git@{domain}:{username}/{repo name that does not exist yet}.git + +# push to the remote +git push -u origin main +``` + +This assumes you are using an SSH remote, but you can also use HTTPS remotes as well. + +## Push options (bonus) + +Push-to-create will default to the visibility defined by `DEFAULT_PUSH_CREATE_PRIVATE` in `app.ini`. To explicitly set the visibility, you can use a push option. From 0023f707b2f3a8b9acd65b0861ed6395ae1dfbb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Dachary?= Date: Tue, 14 Mar 2023 22:24:32 +0100 Subject: [PATCH 3/3] docs: update of the labels documentation Closes: https://codeberg.org/forgejo/website/issues/180 --- v1.19/user/labels.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/v1.19/user/labels.md b/v1.19/user/labels.md index 5a6451d7..91ad1d5d 100644 --- a/v1.19/user/labels.md +++ b/v1.19/user/labels.md @@ -2,7 +2,7 @@ layout: '~/layouts/Markdown.astro' title: 'Labels' license: 'Apache-2.0' -origin_url: 'https://github.com/go-gitea/gitea/blob/5d621fe9a7f27b5168db22dc38423b71037bcae0/docs/content/doc/usage/labels.en-us.md' +origin_url: 'https://github.com/go-gitea/gitea/blob/a8e13e64da7f9dc6176365e6b9295981af5d81ea/docs/content/doc/usage/labels.en-us.md' --- You can use labels to classify issues and pull requests and to improve your overview over them. @@ -21,15 +21,17 @@ When you create a repository, you can ensure certain labels exist by using the ` ![list of labels](../../../../images/v1.19/user/labels/label-apply.png) +When you create a repository, you can ensure certain labels exist by using the `Issue Labels` option. This option lists a number of available label sets that are configured globally on your instance. Its contained labels will all be created as well while creating the repository. + ## Scoped Labels -A scoped label is a label that contains `/` in its name (not at either end of the name). For example labels `kind/bug` and `kind/enhancement` both have scope `kind`. Such labels will display the scope with slightly darker color. +Scoped labels are used to ensure at most a single label with the same scope is assigned to an issue or pull request. For example, if labels `kind/bug` and `kind/enhancement` have the Exclusive option set, an issue can only be classified as a bug or an enhancement. ![list of labels](../../../../images/v1.19/user/labels/label-list.png) -The scope of a label is determined based on the **last** `/`, so for example the scope of label `scope/subscope/item` is `scope/subscope`. +A scoped label must contain `/` in its name (not at either end of the name). The scope of a label is determined based on the **last** `/`, so for example the scope of label `scope/subscope/item` is `scope/subscope`. -Scoped labels can be marked as exclusive. This ensures at most a single label with the same scope is assigned to an issue or pull request. For example, if `kind/bug` and `kind/enhancement` are marked exclusive, an issue can only be classified as a bug or an enhancement. +A scoped label must contain `/` in its name (not at either end of the name). The scope of a label is determined based on the **last** `/`, so for example the scope of label `scope/subscope/item` is `scope/subscope`. ## Filtering by Label