Verified Commit 2d5a5882 authored by anarcat's avatar anarcat 💥
Browse files

more tweaks to membership retirement noop

This properly marks the docs section as being skipped, properly skips
the last entry, makes an actual checklist that can be copy-pasted, and
fixes the echo issue in ud-lock.
parent fd0d9e2a
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@ class LockAccountStep(NoopRunner):
            )
        else:
            print(
                "run:\n\tssh db.torproject.org ud-lock {}".format(context["username"])
                "run:\n\tssh -tt db.torproject.org ud-lock {}".format(context["username"])
            )
        wait()

@@ -64,7 +64,7 @@ class TableOnlyExtractor(mistune.HTMLRenderer):
    heading_row_count = 0

    def heading(self, text, level, **attrs):
        if text.lower() == "retired":
        if text.lower() in ("retired", "documentation assessment"):
            self.skip_section = True
        else:
            self.skip_section = False
@@ -95,7 +95,11 @@ class TableOnlyExtractor(mistune.HTMLRenderer):
        return text

    def wrap_up(self):
        if self.current_service and not self.service_auth_map.get(self.current_service):
        if (
            not self.skip_section
            and self.current_service
            and not self.service_auth_map.get(self.current_service)
        ):
            self.service_auth_map[self.current_service] = self.last_cell


@@ -108,7 +112,7 @@ class RevokeServiceAccessStep(NoopRunner):
        markdown(content)
        renderer.wrap_up()
        for service, auth in renderer.service_auth_map.items():
            print(f"{service}: {auth}")
            print(f" - [ ] {service}: {auth}")

    def run(self, context):
        print(