| 689 | } |
| 690 | |
| 691 | func (ge *githubExporter) updateGithubIssueStatus(ctx context.Context, gc *rateLimitHandlerClient, id string, status common.Status) error { |
| 692 | m := &updateIssueMutation{} |
| 693 | |
| 694 | // set state |
| 695 | var state githubv4.IssueState |
| 696 | |
| 697 | switch status { |
| 698 | case common.OpenStatus: |
| 699 | state = githubv4.IssueStateOpen |
| 700 | case common.ClosedStatus: |
| 701 | state = githubv4.IssueStateClosed |
| 702 | default: |
| 703 | panic("unknown bug state") |
| 704 | } |
| 705 | |
| 706 | input := githubv4.UpdateIssueInput{ |
| 707 | ID: id, |
| 708 | State: &state, |
| 709 | } |
| 710 | |
| 711 | if err := gc.mutate(ctx, m, input, nil, ge.out); err != nil { |
| 712 | return err |
| 713 | } |
| 714 | |
| 715 | return nil |
| 716 | } |
| 717 | |
| 718 | func (ge *githubExporter) updateGithubIssueBody(ctx context.Context, gc *rateLimitHandlerClient, id string, body string) error { |
| 719 | m := &updateIssueMutation{} |