summaryrefslogtreecommitdiff
path: root/rules/main.lace
blob: 6ca562961fd858cfa9a31e125523e0bd34a33fa3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Pull up some standard defines for NetSurf

define is_core_dev group netsurf-core
define at_least_contrib group netsurf-contrib

define is_master ref refs/heads/master
define is_personal_branch ref ~^refs/heads/${user}/
define is_tag ref ~^refs/tags/
define is_release_branch ref ~^refs/heads/release

# First up, the basic write ops
allow "Core and contrib may push content" op_write at_least_contrib

# Noone may delete master
deny "Master is sacrosanct" op_deleteref is_master

# Now, allow core/contrib to do normal branch ops on their personal branches
allow "Core/Contrib may push to personal branches" op_is_normal at_least_contrib is_personal_branch
allow "Core/Contrib may force-push to personal branches" op_forcedupdate at_least_contrib is_personal_branch

# Allow core to push to master
allow "Core may push to master" op_is_normal is_core_dev is_master

# Allow certain contribs to push to various areas
define user_is_mono user mono
define is_atari_dev anyof is_core_dev user_is_mono
define contains_atari treediff/targets ~^atari/
define contains_non_atari treediff/targets !~^atari/
allow "Atari devs may edit atari/" op_is_update is_atari_dev contains_atari !contains_non_atari
define contains_docs treediff/targets ~^Docs/
define contains_non_docs treediff/targets !~^Docs/
allow "Ole Loots may edit Docs/" op_is_update user_is_mono contains_docs !contains_non_docs
define user_is_stevef user stevef
define is_riscos_dev anyof is_core_dev user_is_stevef
define contains_riscos treediff/targets ~^riscos/
define contains_non_riscos treediff/targets !~^riscos/
allow "RISC OS devs may edit riscos/" op_is_update is_riscos_dev contains_riscos !contains_non_riscos
define user_is_mmu_man user mmu_man
define is_beos_dev anyof is_core_dev user_is_mmu_man
define contains_beos treediff/targets ~^beos/
define contains_non_beos treediff/targets !~^beos/
allow "BeOS devs may edit beos/" op_is_update is_beos_dev contains_beos !contains_non_beos

# Allow core devs to push tags
allow "Core devs may affect tags" op_is_normal is_core_dev is_tag

# Allow core devs to push release branches
allow "Core devs may affect release branches" op_is_normal is_core_dev is_release_branch

# Finally allow core to delete branches from anywhere but master
allow "Core may prune branches" op_deleteref is_core_dev !is_master