diff --git a/v1.19/user/index.md b/v1.19/user/index.md index 722cbc17..d58a711b 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/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 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 ``` 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.