Skip to content

Add maturity report to Service#558

Merged
derek-etherton-opslevel merged 4 commits into
mainfrom
add-maturity-report-to-service-struct
May 28, 2025
Merged

Add maturity report to Service#558
derek-etherton-opslevel merged 4 commits into
mainfrom
add-maturity-report-to-service-struct

Conversation

@derek-etherton-opslevel
Copy link
Copy Markdown
Contributor

@derek-etherton-opslevel derek-etherton-opslevel commented May 28, 2025

Solution

Screenshot 2025-05-27 at 8 43 25 PM
func main() {
	apiToken := os.Getenv("OPSLEVEL_API_TOKEN")
	if apiToken == "" {
		log.Fatal("OPSLEVEL_API_TOKEN environment variable is not set")
	}

	client := opslevel.NewGQLClient(opslevel.SetAPIToken(apiToken))

	services, err := client.ListServices(nil)
	if err != nil {
		log.Fatalf("Failed to list services: %v", err)
	}

	fmt.Printf("%+v\n", services.Nodes[0].MaturityReport)
}

Checklist

  • I have run this code, and it appears to resolve the stated issue.
  • This PR does not reduce total test coverage
  • This PR has no user interface changes or has already received approval from product management to change the interface.
  • Does this change require a Terraform schema change?
    • If so what is the ticket or PR #
  • Make a changie entry that explains the customer facing outcome of this change

Comment thread testdata/templates/query/service/get.tpl Outdated
@derek-etherton-opslevel derek-etherton-opslevel force-pushed the add-maturity-report-to-service-struct branch from 4eaa7b4 to 0536c50 Compare May 28, 2025 14:34
Comment thread maturity.go Outdated
@derek-etherton-opslevel derek-etherton-opslevel force-pushed the add-maturity-report-to-service-struct branch from 25d8dd5 to 4aaeb41 Compare May 28, 2025 14:39
@derek-etherton-opslevel derek-etherton-opslevel force-pushed the add-maturity-report-to-service-struct branch from 5c0b0de to 46c9d66 Compare May 28, 2025 14:42
Copy link
Copy Markdown
Contributor

@rocktavious rocktavious left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - There might still be lint failures - if so you can run task fix from the root of the repo to get auto fixes.

@derek-etherton-opslevel derek-etherton-opslevel merged commit caad994 into main May 28, 2025
5 checks passed
@derek-etherton-opslevel derek-etherton-opslevel deleted the add-maturity-report-to-service-struct branch May 28, 2025 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants