Skip to content
This repository was archived by the owner on May 5, 2025. It is now read-only.

Commit 55ebaf7

Browse files
wip
1 parent ccb7265 commit 55ebaf7

File tree

3 files changed

+109
-174
lines changed

3 files changed

+109
-174
lines changed
Lines changed: 64 additions & 135 deletions
Original file line numberDiff line numberDiff line change
@@ -1,145 +1,74 @@
11
codecov:
2-
token: uuid # Your private repository token
3-
url: "http://codecov.io" # for Codecov Enterprise customers
4-
slug: "owner/repo" # for Codecov Enterprise customers
5-
branch: master # override the default branch
6-
bot: username # set user whom will be the consumer of oauth requests
7-
ci: # Custom CI domains if Codecov does not identify them automatically
8-
- ci.domain.com
9-
- "!provider" # ignore these providers when checking if CI passed
10-
# ex. You may test on Travis, Circle, and AppVeyor, but only need
11-
# to check if Travis passes. Therefore add: !circle and !appveyor
12-
notify: # ADVANCED USE ONLY
13-
after_n_builds: 2 # number of expected builds to recieve before sending notifications
14-
# after: check ci status unless disabled via require_ci_to_pass
15-
require_ci_to_pass: yes # yes: will delay sending notifications until all ci is finished
16-
# no: will send notifications without checking ci status and wait till "after_n_builds" are uploaded
17-
countdown: 12 # number of seconds to wait before first ci build check
18-
delay: 4 # number of seconds to wait between ci build checks
2+
require_ci_to_pass: false
193

20-
coverage:
21-
precision: 2 # 2 = xx.xx%, 0 = xx%
22-
round: down # default down
23-
range: 50...60 # default 70...90. red...green
24-
25-
notify:
26-
irc:
27-
default:
28-
server: "chat.freenode.net"
29-
branches: null # all branches by default
30-
threshold: 1%
31-
message: "Coverage {{changed}} for {{owner}}/{{repo}}" # customize the message
32-
flags: null
33-
paths: null
34-
35-
slack:
36-
default:
37-
url: "secret:c/nCgqn5v1HY5VFIs9i4W3UY6eleB2rTBdBKK/ilhPR7Ch4N0FE1aO6SRfAxp3Zlm4tLNusaPY7ettH6dTYj/YhiRohxiNqJMJ4L9YQmESo="
38-
threshold: 1%
39-
branches: null # all branches by default
40-
message: "Coverage {{changed}} for {{owner}}/{{repo}}" # customize the message
41-
attachments: "sunburst, diff"
42-
only_pulls: false
43-
flags: null
44-
paths: null
45-
46-
email:
47-
default:
48-
to:
49-
50-
51-
threshold: 1%
52-
only_pulls: false
53-
layout: reach, diff, flags
54-
flags: null
55-
paths: null
56-
57-
hipchat:
58-
default:
59-
url: "secret:c/nCgqn5v1HY5VFIs9i4W3UY6eleB2rTBdBKK/ilhPR7Ch4N0FE1aO6SRfAxp3Zlm4tLNusaPY7ettH6dTYj/YhiRohxiNqJMJ4L9YQmESo="
60-
threshold: 1%
61-
branches: null # all branches by default
62-
notify: false # if the hipchat message is silent or loud (default false)
63-
message: "Coverage {{changed}} for {{owner}}/{{repo}}" # customize the message
64-
flags: null
65-
paths: null
66-
67-
gitter:
68-
default:
69-
url: "secret:c/nCgqn5v1HY5VFIs9i4W3UY6eleB2rTBdBKK/ilhPR7Ch4N0FE1aO6SRfAxp3Zlm4tLNusaPY7ettH6dTYj/YhiRohxiNqJMJ4L9YQmESo="
70-
threshold: 1%
71-
branches: null # all branches by default
72-
message: "Coverage {{changed}} for {{owner}}/{{repo}}" # customize the message
73-
74-
webhook:
75-
_name_:
76-
url: "secret:c/nCgqn5v1HY5VFIs9i4W3UY6eleB2rTBdBKK/ilhPR7Ch4N0FE1aO6SRfAxp3Zlm4tLNusaPY7ettH6dTYj/YhiRohxiNqJMJ4L9YQmESo="
77-
threshold: 1%
78-
branches: null # all branches by default
4+
comment:
5+
show_carryforward_flags: true
796

80-
status:
81-
project:
82-
default:
83-
base: parent
84-
target: auto
85-
threshold: 1%
86-
branches:
87-
- master
88-
if_no_uploads: error
89-
if_not_found: success
90-
if_ci_failed: error
91-
only_pulls: false
92-
flags:
93-
- integration
7+
flags:
8+
database:
949
paths:
95-
- folder
96-
10+
- packages/database/**
11+
carryforward: true
12+
gateway:
13+
paths:
14+
- packages/gateway/**
15+
carryforward: true
16+
lobby:
17+
paths:
18+
- packages/lobby/**
19+
carryforward: true
20+
login:
21+
paths:
22+
- packages/login/**
23+
carryforward: true
9724
patch:
98-
default:
99-
base: parent
100-
target: 80%
101-
branches: null
102-
if_no_uploads: success
103-
if_not_found: success
104-
if_ci_failed: error
105-
only_pulls: false
106-
flags:
107-
- integration
10825
paths:
109-
- folder
110-
111-
changes:
112-
default:
113-
base: parent
114-
branches: null
115-
if_no_uploads: error
116-
if_not_found: success
117-
if_ci_failed: error
118-
only_pulls: false
119-
flags:
120-
- integration
26+
- packages/patch/**
27+
carryforward: true
28+
persona:
29+
paths:
30+
- packages/persona/**
31+
carryforward: true
32+
shard:
33+
paths:
34+
- packages/shard/**
35+
carryforward: true
36+
shared:
37+
paths:
38+
- packages/shared/**
39+
carryforward: true
40+
transactions:
12141
paths:
122-
- folder
42+
- packages/transactions/**
43+
carryforward: true
44+
interfaces:
45+
paths:
46+
- packages/interfaces/**
47+
carryforward: false
48+
core:
49+
paths:
50+
- packages/core/**
51+
carryforward: true
12352

124-
flags:
125-
integration:
126-
assume:
127-
branches:
128-
- master
129-
ignore:
130-
- app/ui
53+
component_management:
54+
default_rules: # default rules that will be inherited by all components
55+
statuses:
56+
- type: project # in this case every component that doens't have a status defined will have a project type one
57+
target: auto
58+
branches:
59+
- "!main"
13160

132-
ignore: # files and folders for processing
133-
- tests/*
134-
135-
fixes:
136-
- "old_path::new_path"
61+
individual_components:
62+
- component_id: module_nps
63+
name: Team 2
64+
statuses:
65+
type: patch
66+
target: auto
67+
paths:
68+
- lib/nps/**
13769

138-
comment:
139-
layout: diff, flags, reach
140-
branches:
141-
- "*"
142-
behavior: default # defualt = posts once then update, posts new if delete
143-
# once = post once then updates
144-
# new = delete old, post new
145-
# spammy = post new
70+
coverage:
71+
status:
72+
project:
73+
default:
74+
removed_code_behavior: adjust_base

services/yaml/tests/test_yaml_parsing.py

Lines changed: 40 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -11,54 +11,55 @@
1111

1212

1313
class TestYamlSavingService(BaseTestCase):
14-
def test_parse_empty_yaml(self):
15-
contents = ""
16-
res = parse_yaml_file(contents, show_secrets_for=("github", 123, 456))
17-
assert res is None
14+
# def test_parse_empty_yaml(self):
15+
# contents = ""
16+
# res = parse_yaml_file(contents, show_secrets_for=("github", 123, 456))
17+
# assert res is None
1818

19-
def test_parse_invalid_yaml(self):
20-
contents = "invalid: aaa : bbb"
21-
with pytest.raises(InvalidYamlException):
22-
parse_yaml_file(contents, show_secrets_for=("github", 123, 456))
19+
# def test_parse_invalid_yaml(self):
20+
# contents = "invalid: aaa : bbb"
21+
# with pytest.raises(InvalidYamlException):
22+
# parse_yaml_file(contents, show_secrets_for=("github", 123, 456))
2323

24-
def test_parse_simple_yaml(self):
25-
with open(here.parent / "samples" / "sample_yaml_1.yaml") as f:
26-
contents = f.read()
27-
res = parse_yaml_file(contents, show_secrets_for=("github", 123, 456))
28-
expected_result = {
29-
"coverage": {
30-
"precision": 2,
31-
"round": "down",
32-
"range": [70.0, 100.0],
33-
"status": {"project": True, "patch": True, "changes": False},
34-
},
35-
"codecov": {"notify": {}, "require_ci_to_pass": True},
36-
"comment": {
37-
"behavior": "default",
38-
"layout": "header, diff",
39-
"require_changes": [
40-
CoverageCommentRequiredChanges.no_requirements.value
41-
],
42-
},
43-
"parsers": {
44-
"gcov": {
45-
"branch_detection": {
46-
"conditional": True,
47-
"loop": True,
48-
"macro": False,
49-
"method": False,
50-
}
51-
}
52-
},
53-
}
54-
assert res == expected_result
24+
# def test_parse_simple_yaml(self):
25+
# with open(here.parent / "samples" / "sample_yaml_1.yaml") as f:
26+
# contents = f.read()
27+
# res = parse_yaml_file(contents, show_secrets_for=("github", 123, 456))
28+
# expected_result = {
29+
# "coverage": {
30+
# "precision": 2,
31+
# "round": "down",
32+
# "range": [70.0, 100.0],
33+
# "status": {"project": True, "patch": True, "changes": False},
34+
# },
35+
# "codecov": {"notify": {}, "require_ci_to_pass": True},
36+
# "comment": {
37+
# "behavior": "default",
38+
# "layout": "header, diff",
39+
# "require_changes": [
40+
# CoverageCommentRequiredChanges.no_requirements.value
41+
# ],
42+
# },
43+
# "parsers": {
44+
# "gcov": {
45+
# "branch_detection": {
46+
# "conditional": True,
47+
# "loop": True,
48+
# "macro": False,
49+
# "method": False,
50+
# }
51+
# }
52+
# },
53+
# }
54+
# assert res == expected_result
5555

5656
def test_parse_big_yaml_file(self):
5757
with open(here.parent / "samples" / "big.yaml") as f:
5858
contents = f.read()
5959
res = parse_yaml_file(
6060
contents, show_secrets_for=("github", 44376991, 156617777)
6161
)
62+
print("THIS IS RES", res)
6263
expected_result = {
6364
"comment": {
6465
"branches": [".*"],

tasks/sync_teams.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ def run_impl(self, db_session, ownerid, *, username=None, **kwargs):
5858
ownerid=ownerid,
5959
),
6060
)
61+
# The org has members in plan_activated_users
62+
# The member has the org in organizations
63+
# Ownerid is the member's ownerid
64+
for org in removed_orgs:
65+
org.plan_activated_users.remove(ownerid)
6166

6267
owner.updatestamp = datetime.now()
6368
owner.organizations = team_ids

0 commit comments

Comments
 (0)