Commit a9dcfd851f80c35522ac844b316af783d0db7e64

Authored by Dmitriy Zaporozhets
2 parents 54e40241 c06f4cd4

Merge pull request #6308 from jvanbaarsen/help-to-markdown

Convert all help files to markdown files in doc directory
app/views/admin/hooks/_data_ex.html.haml
@@ -1,67 +0,0 @@ @@ -1,67 +0,0 @@
1 -= highlight_js do  
2 - :erb  
3 - 1. Project created:  
4 - {  
5 - "created_at": "2012-07-21T07:30:54Z",  
6 - "event_name": "project_create",  
7 - "name": "StoreCloud",  
8 - "owner_email": "johnsmith@gmail.com"  
9 - "owner_name": "John Smit",  
10 - "path": "stormcloud",  
11 - "path_with_namespace": "jsmith/stormcloud",  
12 - "project_id": 74,  
13 - }  
14 -  
15 - 2. Project destroyed:  
16 - {  
17 - "created_at": "2012-07-21T07:30:58Z",  
18 - "event_name": "project_destroy",  
19 - "name": "Underscore",  
20 - "owner_email": "johnsmith@gmail.com"  
21 - "owner_name": "John Smith",  
22 - "path": "underscore",  
23 - "path_with_namespace": "jsmith/underscore",  
24 - "project_id": 73,  
25 - }  
26 -  
27 - 3. New Team Member:  
28 - {  
29 - "created_at": "2012-07-21T07:30:56Z",  
30 - "event_name": "user_add_to_team",  
31 - "project_access": "Master",  
32 - "project_id": 74,  
33 - "project_name": "StoreCloud",  
34 - "project_path": "storecloud",  
35 - "user_email": "johnsmith@gmail.com",  
36 - "user_name": "John Smith",  
37 - }  
38 -  
39 - 4. Team Member Removed:  
40 - {  
41 - "created_at": "2012-07-21T07:30:56Z",  
42 - "event_name": "user_remove_from_team",  
43 - "project_access": "Master",  
44 - "project_id": 74,  
45 - "project_name": "StoreCloud",  
46 - "project_path": "storecloud",  
47 - "user_email": "johnsmith@gmail.com",  
48 - "user_name": "John Smith",  
49 - }  
50 -  
51 - 5. User created:  
52 - {  
53 - "created_at": "2012-07-21T07:44:07Z",  
54 - "email": "js@gitlabhq.com",  
55 - "event_name": "user_create",  
56 - "name": "John Smith",  
57 - "user_id": 41  
58 - }  
59 -  
60 - 6. User removed:  
61 - {  
62 - "created_at": "2012-07-21T07:44:07Z",  
63 - "email": "js@gitlabhq.com",  
64 - "event_name": "user_destroy",  
65 - "name": "John Smith",  
66 - "user_id": 41  
67 - }  
app/views/help/permissions.html.haml
1 = render layout: 'help/layout' do 1 = render layout: 'help/layout' do
2 - %h3.page-title Permissions  
3 - %p.light Users have different abilities depending on the access level they have in particular group or project.  
4 - %p.light If a user is both in a project group and in the project itself the highest permission level is used.  
5 - %p.light If a user is a GitLab administrator they receive all permissions.  
6 - %hr 2 + %h3.page-title Permissions
7 3
8 - %h4 Project:  
9 - %table.table  
10 - %thead  
11 - %tr  
12 - %th Action  
13 - %th Guest  
14 - %th Reporter  
15 - %th Developer  
16 - %th Master  
17 - %th Owner  
18 - %tbody  
19 - %tr  
20 - %td Create new issue  
21 - %td.permission-x ✓  
22 - %td.permission-x ✓  
23 - %td.permission-x ✓  
24 - %td.permission-x ✓  
25 - %td.permission-x ✓  
26 - %tr  
27 - %td Leave comments  
28 - %td.permission-x ✓  
29 - %td.permission-x ✓  
30 - %td.permission-x ✓  
31 - %td.permission-x ✓  
32 - %td.permission-x ✓  
33 - %tr  
34 - %td Write on project wall  
35 - %td.permission-x ✓  
36 - %td.permission-x ✓  
37 - %td.permission-x ✓  
38 - %td.permission-x ✓  
39 - %td.permission-x ✓  
40 - %tr  
41 - %td Pull project code  
42 - %td  
43 - %td.permission-x ✓  
44 - %td.permission-x ✓  
45 - %td.permission-x ✓  
46 - %td.permission-x ✓  
47 - %tr  
48 - %td Download project  
49 - %td  
50 - %td.permission-x ✓  
51 - %td.permission-x ✓  
52 - %td.permission-x ✓  
53 - %td.permission-x ✓  
54 - %tr  
55 - %td Create code snippets  
56 - %td  
57 - %td.permission-x ✓  
58 - %td.permission-x ✓  
59 - %td.permission-x ✓  
60 - %td.permission-x ✓  
61 - %tr  
62 - %td Create new merge request  
63 - %td  
64 - %td  
65 - %td.permission-x ✓  
66 - %td.permission-x ✓  
67 - %td.permission-x ✓  
68 - %tr  
69 - %td Create new branches  
70 - %td  
71 - %td  
72 - %td.permission-x ✓  
73 - %td.permission-x ✓  
74 - %td.permission-x ✓  
75 - %tr  
76 - %td Push to non-protected branches  
77 - %td  
78 - %td  
79 - %td.permission-x ✓  
80 - %td.permission-x ✓  
81 - %td.permission-x ✓  
82 - %tr  
83 - %td Remove non-protected branches  
84 - %td  
85 - %td  
86 - %td.permission-x ✓  
87 - %td.permission-x ✓  
88 - %td.permission-x ✓  
89 - %tr  
90 - %td Add tags  
91 - %td  
92 - %td  
93 - %td.permission-x ✓  
94 - %td.permission-x ✓  
95 - %td.permission-x ✓  
96 - %tr  
97 - %td Write a wiki  
98 - %td  
99 - %td  
100 - %td.permission-x ✓  
101 - %td.permission-x ✓  
102 - %td.permission-x ✓  
103 - %tr  
104 - %td Manage issue tracker  
105 - %td  
106 - %td  
107 - %td.permission-x ✓  
108 - %td.permission-x ✓  
109 - %td.permission-x ✓  
110 - %tr  
111 - %td Add new team members  
112 - %td  
113 - %td  
114 - %td  
115 - %td.permission-x ✓  
116 - %td.permission-x ✓  
117 - %tr  
118 - %td Push to protected branches  
119 - %td  
120 - %td  
121 - %td  
122 - %td.permission-x ✓  
123 - %td.permission-x ✓  
124 - %tr  
125 - %td Remove protected branches  
126 - %td  
127 - %td  
128 - %td  
129 - %td.permission-x ✓  
130 - %td.permission-x ✓  
131 - %tr  
132 - %td Edit project  
133 - %td  
134 - %td  
135 - %td  
136 - %td.permission-x ✓  
137 - %td.permission-x ✓  
138 - %tr  
139 - %td Add Deploy Keys to project  
140 - %td  
141 - %td  
142 - %td  
143 - %td.permission-x ✓  
144 - %td.permission-x ✓  
145 - %tr  
146 - %td Configure Project Hooks  
147 - %td  
148 - %td  
149 - %td  
150 - %td.permission-x ✓  
151 - %td.permission-x ✓  
152 - %tr  
153 - %td Switch visibility level  
154 - %td  
155 - %td  
156 - %td  
157 - %td  
158 - %td.permission-x ✓  
159 - %tr  
160 - %td Transfer project to another namespace  
161 - %td  
162 - %td  
163 - %td  
164 - %td  
165 - %td.permission-x ✓  
166 - %tr  
167 - %td Remove project  
168 - %td  
169 - %td  
170 - %td  
171 - %td  
172 - %td.permission-x ✓  
173 -  
174 - %h4 Group  
175 - %table.table  
176 - %thead  
177 - %tr  
178 - %th Action  
179 - %th Guest  
180 - %th Reporter  
181 - %th Developer  
182 - %th Master  
183 - %th Owner  
184 - %tbody  
185 - %tr  
186 - %td Browse group  
187 - %td.permission-x ✓  
188 - %td.permission-x ✓  
189 - %td.permission-x ✓  
190 - %td.permission-x ✓  
191 - %td.permission-x ✓  
192 - %tr  
193 - %td Edit group  
194 - %td  
195 - %td  
196 - %td  
197 - %td  
198 - %td.permission-x ✓  
199 - %tr  
200 - %td Create project in group  
201 - %td  
202 - %td  
203 - %td  
204 - %td  
205 - %td.permission-x ✓  
206 - %tr  
207 - %td Manage group members  
208 - %td  
209 - %td  
210 - %td  
211 - %td  
212 - %td.permission-x ✓  
213 - %tr  
214 - %td Remove group  
215 - %td  
216 - %td  
217 - %td  
218 - %td  
219 - %td.permission-x ✓  
220 - %p.light Any user can remove himself from a group, unless he is the last Owner of the group. 4 + .help_body
  5 + = preserve do
  6 + = markdown File.read(Rails.root.join("doc", "permissions", "permissions.md"))
app/views/help/public_access.html.haml
1 = render layout: 'help/layout' do 1 = render layout: 'help/layout' do
2 - %h3.page-title Public Access 2 + %h3.page-title Public Access
3 3
4 - %p.slead  
5 - GitLab allows you to open selected projects to be accessed  
6 - %strong publicly  
7 - or  
8 - %strong internally  
9 - \.  
10 - %br  
11 - Projects with either of these visibility levels will be listed in the #{link_to "public access directory", public_root_path}.  
12 - %br  
13 - Internal projects will only be available to authenticated users.  
14 -  
15 - .clearfix  
16 - .dashboard-intro-icon  
17 - = public_icon  
18 - %h4  
19 - Public projects  
20 - %p  
21 - Public project can be cloned  
22 - %strong without any  
23 - authentication.  
24 - %br  
25 - It will also be listed on the #{link_to "public access directory", public_root_path}.  
26 - %br  
27 - %strong Any logged in user  
28 - will have #{link_to "Guest", help_permissions_path} permissions on the repository.  
29 -  
30 - .clearfix  
31 - .dashboard-intro-icon  
32 - = internal_icon  
33 - %h4  
34 - Internal projects  
35 - %p  
36 - Internal project can be cloned by any logged in user.  
37 - %br  
38 - It will also be listed on the #{link_to "public access directory", public_root_path} for logged in users.  
39 - %br  
40 - Any logged in user will have #{link_to "Guest", help_permissions_path} permissions on the repository.  
41 -  
42 - %h4 How to change project visibility  
43 - %ol  
44 - %li Go to your project dashboard  
45 - %li Click on the "Edit" tab  
46 - %li Change "Visibility Level"  
47 -  
48 - %h4 Visibility of users  
49 - The public page of users, located at  
50 - = succeed "," do  
51 - %code u/username  
52 - is visible if either:  
53 - %ul  
54 - %li  
55 - You are logged in.  
56 - %li  
57 - %p  
58 - You are logged out, and the target user is authorized to (is Guest, Reporter, etc.)  
59 - at least one public project.  
60 - %p Otherwise, you will be redirected to the sign in page.  
61 - When visiting the public page of an user, you will only see listed projects which you can view yourself. 4 + .help_body
  5 + = preserve do
  6 + = markdown File.read(Rails.root.join("doc", "public_access", "public_access.md"))
app/views/help/ssh.html.haml
1 = render layout: 'help/layout' do 1 = render layout: 'help/layout' do
2 - %h3.page-title SSH Keys 2 + %h3.page-title SSH Keys
3 3
4 - %p.slead  
5 - SSH key allows you to establish a secure connection between your computer and GitLab  
6 -  
7 - %p.slead  
8 - Before generating an SSH key, check if your system already has one by running cat ~/.ssh/id_rsa.pub  
9 - If your see a long string starting with 'ssh-rsa' or 'ssh-dsa', you can skip the ssh-keygen step.  
10 -  
11 - %p.slead  
12 - To generate a new SSH key just open your terminal and use code below. The ssh-keygen command prompts you for a location and filename to store the key pair and for a password.  
13 - When prompted for the location and filename you can press enter to use the default.  
14 - It is a best practice to use a password for an SSH key but it is not required and you can skip creating a password by pressing enter.  
15 - Note that the password you choose here can't be altered or retrieved.  
16 -  
17 - %pre.dark  
18 - ssh-keygen -t rsa -C "#{current_user.email}"  
19 -  
20 - %p.slead  
21 - Use code below to show your public key.  
22 -  
23 - %pre.dark  
24 - cat ~/.ssh/id_rsa.pub  
25 -  
26 - %p.slead  
27 - Copy-paste the key to the 'My SSH Keys' section under the 'SSH' tab in your user profile.  
28 - Please copy the complete key starting with 'ssh-' and ending with your username and host. 4 + .help_body
  5 + = preserve do
  6 + = markdown File.read(Rails.root.join("doc", "ssh", "ssh.md"))
app/views/help/system_hooks.html.haml
1 = render layout: 'help/layout' do 1 = render layout: 'help/layout' do
2 - %h3.page-title System hooks 2 + %h3.page-title System hooks
3 3
4 - %p.slead  
5 - Your GitLab instance can perform HTTP POST requests on the following events: create_project, delete_project, create_user, delete_user, change_team_member.  
6 - %br  
7 - %br  
8 - System Hooks can be used, e.g. for logging or changing information in a LDAP server.  
9 - %br  
10 - %h5 Hooks request example:  
11 - = render "admin/hooks/data_ex" 4 + .help_body
  5 + = preserve do
  6 + = markdown File.read(Rails.root.join("doc", "system_hooks", "system_hooks.md"))
app/views/help/web_hooks.html.haml
1 = render layout: 'help/layout' do 1 = render layout: 'help/layout' do
2 - %h3.page-title Project web hooks  
3 - %p.light  
4 - Project web hooks allow you to trigger url if new code is pushed or new issue is created  
5 - %hr 2 + %h3.page-title Project web hooks
6 3
7 - %p.slead  
8 - You can configure web hook to listen for specific events like pushes, issues, merge requests.  
9 - %br  
10 - GitLab will send POST request with data to web hook url.  
11 - %br  
12 - Web Hooks can be used to update an external issue tracker, trigger CI builds, update a backup mirror, or even deploy to your production server.  
13 - %hr  
14 -  
15 - %h4 Push events  
16 - %p.light  
17 - Triggered when you push to the repository except pushing tags.  
18 - %br  
19 - Request body:  
20 - = highlight_js do  
21 - :erb  
22 - {  
23 - "before": "95790bf891e76fee5e1747ab589903a6a1f80f22",  
24 - "after": "da1560886d4f094c3e6c9ef40349f7d38b5d27d7",  
25 - "ref": "refs/heads/master",  
26 - "user_id": 4,  
27 - "user_name": "John Smith",  
28 - "project_id": 15,  
29 - "repository": {  
30 - "name": "Diaspora",  
31 - "url": "git@localhost:diaspora.git",  
32 - "description": "",  
33 - "homepage": "http://localhost/diaspora",  
34 - },  
35 - "commits": [  
36 - {  
37 - "id": "b6568db1bc1dcd7f8b4d5a946b0b91f9dacd7327",  
38 - "message": "Update Catalan translation to e38cb41.",  
39 - "timestamp": "2011-12-12T14:27:31+02:00",  
40 - "url": "http://localhost/diaspora/commits/b6568db1bc1dcd7f8b4d5a946b0b91f9dacd7327",  
41 - "author": {  
42 - "name": "Jordi Mallach",  
43 - "email": "jordi@softcatala.org",  
44 - }  
45 - },  
46 - // ...  
47 - {  
48 - "id": "da1560886d4f094c3e6c9ef40349f7d38b5d27d7",  
49 - "message": "fixed readme",  
50 - "timestamp": "2012-01-03T23:36:29+02:00",  
51 - "url": "http://localhost/diaspora/commits/da1560886d4f094c3e6c9ef40349f7d38b5d27d7",  
52 - "author": {  
53 - "name": "GitLab dev user",  
54 - "email": "gitlabdev@dv6700.(none)",  
55 - },  
56 - },  
57 - ],  
58 - "total_commits_count": 4,  
59 - };  
60 -  
61 -  
62 - %h4.prepend-top-20 Issues events  
63 - %p.light  
64 - Triggered when new issue created or existing issue was updated/closed/reopened.  
65 - %br  
66 - Request body:  
67 - = highlight_js do  
68 - :erb  
69 - {  
70 - "object_kind":"issue",  
71 - "object_attributes":{  
72 - "id":301,  
73 - "title":"New API: create/update/delete file",  
74 - "assignee_id":51,  
75 - "author_id":51,  
76 - "project_id":14,  
77 - "created_at":"2013-12-03T17:15:43Z",  
78 - "updated_at":"2013-12-03T17:15:43Z",  
79 - "position":0,  
80 - "branch_name":null,  
81 - "description":"Create new API for manipulations with repository",  
82 - "milestone_id":null,  
83 - "state":"opened",  
84 - "iid":23  
85 - }  
86 - }  
87 - %h4.prepend-top-20 Merge request events  
88 - %p.light  
89 - Triggered when new merge request created or existing merge request was updated/merged/closed.  
90 - %br  
91 - Request body:  
92 - = highlight_js do  
93 - :erb  
94 - {  
95 - "object_kind":"merge_request",  
96 - "object_attributes":{  
97 - "id":99,  
98 - "target_branch":"master",  
99 - "source_branch":"ms-viewport",  
100 - "source_project_id":14,  
101 - "author_id":51,  
102 - "assignee_id":6,  
103 - "title":"MS-Viewport",  
104 - "created_at":"2013-12-03T17:23:34Z",  
105 - "updated_at":"2013-12-03T17:23:34Z",  
106 - "st_commits":null,  
107 - "st_diffs":null,  
108 - "milestone_id":null,  
109 - "state":"opened",  
110 - "merge_status":"unchecked",  
111 - "target_project_id":14,  
112 - "iid":1,  
113 - "description":""  
114 - }  
115 - } 4 + .help_body
  5 + = preserve do
  6 + = markdown File.read(Rails.root.join("doc", "web_hooks", "web_hooks.md"))
app/views/help/workflow.html.haml
1 = render layout: 'help/layout' do 1 = render layout: 'help/layout' do
2 - %h3.page-title Workflow 2 + %h3.page-title Workflow
3 3
4 - %h4 Summary  
5 -  
6 - %ol.help  
7 - %li  
8 - %p Clone project  
9 - .bash  
10 - %pre.dark  
11 - git clone git@example.com:project-name.git  
12 -  
13 - %li  
14 - %p Create branch with your feature  
15 - .bash  
16 - %pre.dark  
17 - git checkout -b $feature_name  
18 -  
19 - %li  
20 - %p Write code. Commit changes  
21 - .bash  
22 - %pre.dark  
23 - git commit -am "My feature is ready"  
24 -  
25 - %li  
26 - %p Push your branch to GitLab  
27 - .bash  
28 - %pre.dark  
29 - git push origin $feature_name  
30 -  
31 - %li  
32 - %p Review your code on Commits page  
33 -  
34 - %li  
35 - %p Create a merge request  
36 -  
37 - %li  
38 - %p Your team lead will review code & merge it to main branch  
39 -  
40 - %h3 Authorization for Merge Requests  
41 - %p  
42 - There are two main ways to have a merge request flow with GitLab: working with protected branches in a single repository, or working with forks of an authoritative project.  
43 -  
44 - %h4 Protected branch flow  
45 - %p  
46 - With the protected branch flow everybody works within the same GitLab project.  
47 - The project maintainers get Master access and the regular developers get Developer access.  
48 - The maintainers mark the authoritative branches as 'Protected'.  
49 - The developers push feature branches to the project and create merge requests to have their feature branches reviewed and merged into one of the protected branches.  
50 - Only users with Master access can merge changes into a protected branch.  
51 -  
52 - %h5 Advantages  
53 - %ul  
54 - %li fewer projects means less clutter  
55 - %li developers need to consider only one remote repository  
56 -  
57 - %h5 Disadvantages  
58 - %ul  
59 - %li manual setup of protected branch required for each new project  
60 -  
61 - %h4 Forking workflow  
62 - %p  
63 - With the forking workflow the maintainers get Master access and the regular developers get Reporter access to the authoritative repository, which prohibits them from pushing any changes to it.  
64 - Developers create forks of the authoritative project and push their feature branches to their own forks.  
65 - To get their changes into master they need to create a merge request across forks.  
66 -  
67 - %h5 Advantages  
68 - %ul  
69 - %li in an appropriately configured GitLab group, new projects automatically get the required access restrictions for regular developers: fewer manual steps to configure authorization for new projects  
70 -  
71 - %h5 Disadvantages  
72 - %ul  
73 - %li all developers on the project need to keep their forks up to date, which requires more advanced Git skills (managing multiple remotes) 4 + .help_body
  5 + = preserve do
  6 + = markdown File.read(Rails.root.join("doc", "workflow", "workflow.md"))
doc/permissions/permissions.md 0 → 100644
@@ -0,0 +1,45 @@ @@ -0,0 +1,45 @@
  1 +Users have different abilities depending on the access level they have in a particular group or project.
  2 +If a user is both in a project group and in the project itself, the highest permission level is used.
  3 +If a user is a GitLab administrator they receive all permissions.
  4 +
  5 +---
  6 +
  7 +#### Project:
  8 +
  9 +
  10 +| Action| Guest | Reporter | Developer | Master | Owner|
  11 +|-------|-------|----------|-----------|--------|------|
  12 +|Create new issue|✓|✓|✓|✓|✓|
  13 +|Leave comments|✓|✓|✓|✓|✓|
  14 +|Write on project wall|✓|✓|✓|✓|✓|
  15 +|Pull project code| |✓|✓|✓|✓|
  16 +|Download project| |✓|✓|✓|✓|
  17 +|Create code snippets| |✓|✓|✓|✓|
  18 +|Create new merge request| ||✓|✓|✓|
  19 +|Create new branches| ||✓|✓|✓|
  20 +|Push to non-protected branches| ||✓|✓|✓|
  21 +|Remove non-protected branches| ||✓|✓|✓|
  22 +|Add tags| ||✓|✓|✓|
  23 +|Write a wiki| ||✓|✓|✓|
  24 +|Manage issue tracker| ||✓|✓|✓|
  25 +|Add new team members| |||✓|✓|
  26 +|Push to protected branches| |||✓|✓|
  27 +|Remove protected branches| |||✓|✓|
  28 +|Edit project| |||✓|✓|
  29 +|Add Deploy Keys to project| |||✓|✓|
  30 +|Confiure Project Hooks| |||✓|✓|
  31 +|Switch visibility level| ||||✓|
  32 +|Transfer project to another namespace| ||||✓|
  33 +|Remove project| ||||✓|
  34 +
  35 +#### Group
  36 +
  37 +|Action|Guest|Reporter|Developer|Master|Owner|
  38 +|------|-----|--------|---------|------|-----|
  39 +|Browse group|✓|✓|✓|✓|✓|
  40 +|Edit group|||||✓|
  41 +|create project in group|||||✓|
  42 +|Manage group members|||||✓|
  43 +|Remove group|||||✓|
  44 +
  45 +Any user can remove himself from a group, unless he is the last Owner of the group.
doc/public_access/public_access.md 0 → 100644
@@ -0,0 +1,28 @@ @@ -0,0 +1,28 @@
  1 +Gitlab allows you to open selected projects to be accessed **publicly** or **internally**.
  2 +Projects with either of these visibility levels will be listen in the [public access directory](/public).
  3 +Internal projects will only be available to authenticated users.
  4 +
  5 +#### Public projects
  6 +Public projects can be cloned **without any** authentication.
  7 +It will also be listen on the [public access directory](/public).
  8 +**Any logged in user** will have [Guest](/help/permissions) permissions on the repository.
  9 +
  10 +#### Internal projects
  11 +Internal projects can be cloned by any logged in user.
  12 +It will also be listed on the [public access directory](/public) for logged in users.
  13 +Any logged in user will have [Guest](/help/permissions) permissions on the repository.
  14 +
  15 +#### How to change project visibility
  16 +1. Go to your project dashboard
  17 +2. Click on the "Edit" tab
  18 +3. Change "Visibility Level"
  19 +
  20 +#### Visibility of users
  21 +The public page of users, located at `/u/username` is visible if either:
  22 +
  23 +* You are logged in.
  24 +* You are logged out, and the target user is authorized to (is Guest, Reporter, etc.) at least one public project.
  25 +
  26 +Otherwise, you will be redirected to the sign in page.
  27 +
  28 +When visiting the public page of an user, you will only see listed projects which you can view yourself.
doc/ssh/ssh.md 0 → 100644
@@ -0,0 +1,24 @@ @@ -0,0 +1,24 @@
  1 +SSH key allows you to establish a secure connection between your computer and GitLab
  2 +
  3 +
  4 +Before generating an SSH key, check if your system already has one by running `cat ~/.ssh/id_rsa.pub`
  5 +If your see a long string starting with `ssh-rsa` or `ssh-dsa`, you can skip the ssh-keygen step.
  6 +
  7 +
  8 +To generate a new SSH key just open your terminal and use code below. The ssh-keygen command prompts you for a location and filename to store the key pair and for a password.
  9 +When prompted for the location and filename you can press enter to use the default.
  10 +It is a best practice to use a password for an SSH key but it is not required and you can skip creating a password by pressing enter.
  11 +Note that the password you choose here can't be altered or retrieved.
  12 +
  13 +```bash
  14 +ssh-keygen -t rsa -C "$your_email"
  15 +```
  16 +
  17 +Use the code below to show your public key.
  18 +
  19 +```bash
  20 +cat ~/.ssh/id_rsa.pub
  21 +```
  22 +
  23 +Copy-paste the key to the 'My SSH Keys' section under the 'SSH' tab in your user profile.
  24 +Please copy the complete key starting with `ssh-` and ending with your username and host.
doc/system_hooks/system_hooks.md 0 → 100644
@@ -0,0 +1,89 @@ @@ -0,0 +1,89 @@
  1 +Your GitLab instance can perform HTTP POST requests on the following events: `create_project`, `delete_project`, `create_user`, `delete_user` and `change_team_member`.
  2 +
  3 +System hooks can be used, e.g. for logging or changing information in a LDAP server.
  4 +
  5 +#### Hooks request example:
  6 +
  7 +**Project created:**
  8 +
  9 +```json
  10 +{
  11 + "created_at": "2012-07-21T07:30:54Z",
  12 + "event_name": "project_create",
  13 + "name": "StoreCloud",
  14 + "owner_email": "johnsmith@gmail.com"
  15 + "owner_name": "John Smit",
  16 + "path": "stormcloud",
  17 + "path_with_namespace": "jsmith/stormcloud",
  18 + "project_id": 74,
  19 +}
  20 +```
  21 +
  22 +**Project destroyed:**
  23 +
  24 +```json
  25 +{
  26 + "created_at": "2012-07-21T07:30:58Z",
  27 + "event_name": "project_destroy",
  28 + "name": "Underscore",
  29 + "owner_email": "johnsmith@gmail.com"
  30 + "owner_name": "John Smith",
  31 + "path": "underscore",
  32 + "path_with_namespace": "jsmith/underscore",
  33 + "project_id": 73,
  34 +}
  35 +```
  36 +
  37 +**New Team Member:**
  38 +
  39 +```ruby
  40 +{
  41 + "created_at": "2012-07-21T07:30:56Z",
  42 + "event_name": "user_add_to_team",
  43 + "project_access": "Master",
  44 + "project_id": 74,
  45 + "project_name": "StoreCloud",
  46 + "project_path": "storecloud",
  47 + "user_email": "johnsmith@gmail.com",
  48 + "user_name": "John Smith",
  49 +}
  50 +```
  51 +
  52 +**Team Member Removed:**
  53 +
  54 +```json
  55 +{
  56 + "created_at": "2012-07-21T07:30:56Z",
  57 + "event_name": "user_remove_from_team",
  58 + "project_access": "Master",
  59 + "project_id": 74,
  60 + "project_name": "StoreCloud",
  61 + "project_path": "storecloud",
  62 + "user_email": "johnsmith@gmail.com",
  63 + "user_name": "John Smith",
  64 +}
  65 +```
  66 +
  67 +**User created:**
  68 +
  69 +```json
  70 +{
  71 + "created_at": "2012-07-21T07:44:07Z",
  72 + "email": "js@gitlabhq.com",
  73 + "event_name": "user_create",
  74 + "name": "John Smith",
  75 + "user_id": 41
  76 +}
  77 +```
  78 +
  79 +**User removed:**
  80 +
  81 +```json
  82 +{
  83 + "created_at": "2012-07-21T07:44:07Z",
  84 + "email": "js@gitlabhq.com",
  85 + "event_name": "user_destroy",
  86 + "name": "John Smith",
  87 + "user_id": 41
  88 +}
  89 +```
doc/web_hooks/web_hooks.md 0 → 100644
@@ -0,0 +1,112 @@ @@ -0,0 +1,112 @@
  1 +Project web hooks allow you to trihher an url if new code is pushed or a new issue is created.
  2 +
  3 +---
  4 +
  5 +You can configure web hook to listen for specific events like pushes, issues, merge requests.
  6 +GitLab will send POST request with data to web hook url.
  7 +Web Hooks can be used to update an external issue tracker, trigger CI builds, update a backup mirror, or even deploy to your production server.
  8 +
  9 +---
  10 +
  11 +#### Push events
  12 +Triggered when you push to the repository except pushing tags.
  13 +
  14 +**Request body:**
  15 +
  16 +```json
  17 +{
  18 + "before": "95790bf891e76fee5e1747ab589903a6a1f80f22",
  19 + "after": "da1560886d4f094c3e6c9ef40349f7d38b5d27d7",
  20 + "ref": "refs/heads/master",
  21 + "user_id": 4,
  22 + "user_name": "John Smith",
  23 + "project_id": 15,
  24 + "repository": {
  25 + "name": "Diaspora",
  26 + "url": "git@localhost:diaspora.git",
  27 + "description": "",
  28 + "homepage": "http://localhost/diaspora"
  29 + },
  30 + "commits": [
  31 + {
  32 + "id": "b6568db1bc1dcd7f8b4d5a946b0b91f9dacd7327",
  33 + "message": "Update Catalan translation to e38cb41.",
  34 + "timestamp": "2011-12-12T14:27:31+02:00",
  35 + "url": "http://localhost/diaspora/commits/b6568db1bc1dcd7f8b4d5a946b0b91f9dacd7327",
  36 + "author": {
  37 + "name": "Jordi Mallach",
  38 + "email": "jordi@softcatala.org"
  39 + }
  40 + },
  41 + {
  42 + "id": "da1560886d4f094c3e6c9ef40349f7d38b5d27d7",
  43 + "message": "fixed readme",
  44 + "timestamp": "2012-01-03T23:36:29+02:00",
  45 + "url": "http://localhost/diaspora/commits/da1560886d4f094c3e6c9ef40349f7d38b5d27d7",
  46 + "author": {
  47 + "name": "GitLab dev user",
  48 + "email": "gitlabdev@dv6700.(none)"
  49 + }
  50 + }
  51 + ],
  52 + "total_commits_count": 4
  53 +}
  54 +```
  55 +
  56 +#### Issues events
  57 +
  58 +Triggered when a new issue is created or an existing issue was updated/closed/reopened.
  59 +
  60 +**Request body:**
  61 +
  62 +```json
  63 +{
  64 + "object_kind": "issue",
  65 + "object_attributes": {
  66 + "id": 301,
  67 + "title": "New API: create/update/delete file",
  68 + "assignee_id": 51,
  69 + "author_id": 51,
  70 + "project_id": 14,
  71 + "created_at": "2013-12-03T17:15:43Z",
  72 + "updated_at": "2013-12-03T17:15:43Z",
  73 + "position": 0,
  74 + "branch_name": null,
  75 + "description": "Create new API for manipulations with repository",
  76 + "milestone_id": null,
  77 + "state": "opened",
  78 + "iid": 23
  79 + }
  80 +}
  81 +```
  82 +
  83 +#### Merge request events
  84 +
  85 +Triggered when a new merge request is created or an existing merge request was updated/merges/closed.
  86 +
  87 +**Request body:**
  88 +
  89 +```json
  90 +{
  91 + "object_kind": "merge_request",
  92 + "object_attributes": {
  93 + "id": 99,
  94 + "target_branch": "master",
  95 + "source_branch": "ms-viewport",
  96 + "source_project_id": 14,
  97 + "author_id": 51,
  98 + "assignee_id": 6,
  99 + "title": "MS-Viewport",
  100 + "created_at": "2013-12-03T17:23:34Z",
  101 + "updated_at": "2013-12-03T17:23:34Z",
  102 + "st_commits": null,
  103 + "st_diffs": null,
  104 + "milestone_id": null,
  105 + "state": "opened",
  106 + "merge_status": "unchecked",
  107 + "target_project_id": 14,
  108 + "iid": 1,
  109 + "description": ""
  110 + }
  111 +}
  112 +```
doc/workflow/workflow.md 0 → 100644
@@ -0,0 +1,26 @@ @@ -0,0 +1,26 @@
  1 +1. Clone project
  2 +
  3 + ```bash
  4 + git clone git@example.com:project-name.git
  5 + ```
  6 +2. Create branch with your feature
  7 +
  8 + ```bash
  9 + git checkout -b $feature_name
  10 + ```
  11 +
  12 +3. Write code. Comit changes
  13 +
  14 + ```bash
  15 + git commit -am "My feature is ready"
  16 + ```
  17 +
  18 +4. Push your branch to GitLab
  19 +
  20 + ```bash
  21 + git push origin $feature_name
  22 + ```
  23 +
  24 +5. Review your code on Commits page
  25 +6. Create a merge request
  26 +7. Your team lead will review the code & merge it to the main branch