To run this script, download this script to a folder on your computer and run npx zx create-prs.md.
You must install the following utilities to run this script.
| query AllOrganizations($organization: String!, $endCursor: String) { | |
| organizations(first: 100, after: $organization) { | |
| pageInfo { | |
| hasNextPage | |
| endCursor | |
| } | |
| nodes { | |
| ... OrganizationNode | |
| ... on Organization { | |
| repositories(first: 100, after: $endCursor) { |
| { | |
| "data": { | |
| "meta": [ | |
| { | |
| "name": "Component", | |
| "count": 1, | |
| "vertices": { | |
| "owner": { | |
| "name": "Group", | |
| "field": "owner", |
| type Person { | |
| name: String | |
| accounts: [Account] | |
| } | |
| type Account { | |
| owner: Person! @inverse(of: "Person.accounts") | |
| } |
| catalog: | |
| locations: | |
| - type: url | |
| target: http://github.com/my-org/my-repo/blob/main/components.yaml |
| type Component { | |
| ownedBy: ComponentOwners | |
| providesApi: [API] | |
| dependsOn: Component | |
| parentOf: Component | |
| childOf: Component | |
| partOf: PartOf | |
| } | |
| union PartOf = Component | System | Domain |
| backend: | |
| database: | |
| client: pg | |
| connection: | |
| host: localhost | |
| port: 5432 | |
| user: postgres | |
| password: postgres |
| let app = createAppInteractor(); | |
| let signin = createAppInteractor(); | |
| describe("sign-in", () => { | |
| describe("when user is anonymous", () => { | |
| beforeEach(async () => { | |
| await app.visit('/sign-in'); | |
| }); | |
| it("shows sign-in page", () => { |
| import { TestImplementation, Assertion, Test } from "@bigtest/suite"; | |
| const visit = (path: string) => async () => ({ path }); | |
| const exists = (selector: string) => () => ({ selector }); | |
| const notExists = (selector: string) => () => ({ selector }); | |
| const assert = (fn: () => boolean, expected: unknown) => (context: unknown) => | |
| Promise.resolve(expected); | |
| const click = (selector: string) => async () => Promise.resolve(); | |
| const fillIn = (selector: string, value: string) => async () => | |
| Promise.resolve(); |
| { | |
| description: "Sigin in via Modal", | |
| steps: [ | |
| { | |
| description: "visit home", | |
| action: (context) => visit('/') | |
| }, | |
| { | |
| description: "does sign in button exist?" | |
| action: Modal.isVisible() |