-
Notifications
You must be signed in to change notification settings - Fork 415
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: merge main to release (feat/rfc)
ci: merge main to release (feat/rfc)
- Loading branch information
Showing
226 changed files
with
4,522 additions
and
2,807 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ on: | |
pull_request: | ||
branches: | ||
- 'main' | ||
- 'feat/rfc' | ||
paths: | ||
- 'client/**' | ||
- 'ietf/**' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Generated by Django 4.2.3 on 2023-07-07 18:33 | ||
|
||
from django.db import migrations | ||
|
||
|
||
def forward(apps, schema_editor): | ||
"""Track any RFCs that were created from tracked drafts""" | ||
CommunityList = apps.get_model("community", "CommunityList") | ||
RelatedDocument = apps.get_model("doc", "RelatedDocument") | ||
|
||
# Handle individually tracked documents | ||
for cl in CommunityList.objects.all(): | ||
for rfc in set( | ||
RelatedDocument.objects.filter( | ||
source__in=cl.added_docs.all(), | ||
relationship__slug="became_rfc", | ||
).values_list("target__docs", flat=True) | ||
): | ||
cl.added_docs.add(rfc) | ||
|
||
# Handle rules - rules ending with _rfc should no longer filter by state. | ||
# There are 9 CommunityLists with invalid author_rfc rules that are filtering | ||
# by (draft, active) instead of (draft, rfc) state before migration. All but one | ||
# also includes an author rule for (draft, active), so these will start following | ||
# RFCs as well. The one exception will start tracking RFCs instead of I-Ds, which | ||
# is probably what was intended, but will be a change in their user experience. | ||
SearchRule = apps.get_model("community", "SearchRule") | ||
rfc_rules = SearchRule.objects.filter(rule_type__endswith="_rfc") | ||
rfc_rules.update(state=None) | ||
|
||
def reverse(apps, schema_editor): | ||
Document = apps.get_model("doc", "Document") | ||
for rfc in Document.objects.filter(type__slug="rfc"): | ||
rfc.communitylist_set.clear() | ||
|
||
# See the comment above regarding author_rfc | ||
SearchRule = apps.get_model("community", "SearchRule") | ||
State = apps.get_model("doc", "State") | ||
SearchRule.objects.filter(rule_type__endswith="_rfc").update( | ||
state=State.objects.get(type_id="draft", slug="rfc") | ||
) | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("community", "0002_auto_20230320_1222"), | ||
("doc", "0014_move_rfc_docaliases"), | ||
] | ||
|
||
operations = [migrations.RunPython(forward, reverse)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.