Skip to main content

CREATION_CONTEXT

Constant CREATION_CONTEXT 

Source
pub const CREATION_CONTEXT: &str = r#"query($owner:String!,$number:Int!,$nestedFirst:Int!,$repositoryOwner:String!,$repositoryName:String!){
      boardFields:repositoryOwner(login:$owner){
        ... on ProjectV2Owner{projectV2(number:$number){id
          fields(first:$nestedFirst){nodes{
            ... on ProjectV2SingleSelectField{__typename id name options{id name}}
            ... on ProjectV2Field{__typename id name}
          }pageInfo{hasNextPage}}
        }}
      }
      repository(owner:$repositoryOwner,name:$repositoryName){id nameWithOwner}
    }"#;
Expand description

What creating an issue needs and has not read yet: the board’s own id and field definitions, as BOARD_FIELDS reads them, and the node id of the repository the issue is created in, as REPOSITORY reads it — in one request.

Sent at the point a create knows which repository it is for, when neither half is already known to this process; a create needing only one of them sends that one’s own document. Neither half is kept past the process: a field’s option ids are re-minted by sources fields --apply, so a copy of them held between runs would write the wrong status.