y0rune / opsgenie-scheduler-creator Goto Github PK
View Code? Open in Web Editor NEWAutomatically creator a schedule with rotation in OpsGenie
Automatically creator a schedule with rotation in OpsGenie
apiKey := flag.String("apiKey", "", "# ApiKey for use in that script")
scheduleName := flag.String("scheduleName", "Test Schedule", "# Name of schedule")
scheduleID := flag.String("scheduleID", "XXXXXXXXXXXXXXX", "# ID of schedule")
scheduleTimezone := flag.String("scheduleTimezone", "Europe/Warsaw", "# Timezone of the schedule")
scheduleTeam := flag.String("scheduleTeam", "TestTeam", "# Name of the team in the schedule")
scheduleYear := flag.Int("scheduleYear", 2022, "# Year of the schedule")
scheduleEnabledFlag := flag.Bool("scheduleEnabledFlag", true, "# Schedule is enabled")
Please create a makefile for easier run / build / tests / create releases
Create a release for:
Please update the docs after it.
ERRO[2023-01-28T13:12:51.857747+01:00] Error occurred with Status code: 422, Message: Team with 'name' [TestTeam] does not exist, Took: 0.073000, RequestId: 1a510ef0-92f1-4d7f-8d7b-2ddfe03d31a6
--- FAIL: TestCreateSchedule (0.36s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x60 pc=0x104c35734]
goroutine 20 [running]:
testing.tRunner.func1.2({0x104cf7c80, 0x104eeff00})
/opt/homebrew/opt/go/libexec/src/testing/testing.go:1396 +0x1c8
testing.tRunner.func1()
/opt/homebrew/opt/go/libexec/src/testing/testing.go:1399 +0x378
panic({0x104cf7c80, 0x104eeff00})
/opt/homebrew/opt/go/libexec/src/runtime/panic.go:884 +0x204
opsgenie-scheduler-creator.scheduleCreator({0x14000112f50}, {0x104c3b26d, 0x10}, {0x104c3a205, 0xd}, {0x104c386a8, 0x8}, 0x0)
/Users/yorune/git/opsgenie-scheduler-creator/main.go:118 +0x174
opsgenie-scheduler-creator.TestCreateSchedule(0x140001071e0)
/Users/yorune/git/opsgenie-scheduler-creator/main_test.go:30 +0x60
testing.tRunner(0x140001071e0, 0x104d44218)
/opt/homebrew/opt/go/libexec/src/testing/testing.go:1446 +0x10c
created by testing.(*T).Run
/opt/homebrew/opt/go/libexec/src/testing/testing.go:1493 +0x300
exit status 2
FAIL opsgenie-scheduler-creator 0.567s
WARN[2022-11-01T15:40:05.035734+01:00] Could not set requestId.
Rotation w43-24.10-31.10 has been created for schedule d9b93e0d-58e3-4be1-8bd6-63520b5579f9.
WARN[2022-11-01T15:40:05.485743+01:00] Could not set requestId.
Rotation w44-31.10-7.11 has been created for schedule d9b93e0d-58e3-4be1-8bd6-63520b5579f9.
WARN[2022-11-01T15:40:05.980494+01:00] Could not set requestId.
Rotation w45-7.11-14.11 has been created for schedule d9b93e0d-58e3-4be1-8bd6-63520b5579f9.
WARN[2022-11-01T15:40:06.443914+01:00] Could not set requestId.
Rotation w46-14.11-21.11 has been created for schedule d9b93e0d-58e3-4be1-8bd6-63520b5579f9.
WARN[2022-11-01T15:40:06.883706+01:00] Could not set requestId.
Rotation w47-21.11-28.11 has been created for schedule d9b93e0d-58e3-4be1-8bd6-63520b5579f9.
WARN[2022-11-01T15:40:07.322361+01:00] Could not set requestId.
Rotation w48-28.11-5.12 has been created for schedule d9b93e0d-58e3-4be1-8bd6-63520b5579f9.
WARN[2022-11-01T15:40:07.76348+01:00] Could not set requestId.
Rotation w49-5.12-12.12 has been created for schedule d9b93e0d-58e3-4be1-8bd6-63520b5579f9.
WARN[2022-11-01T15:40:08.193362+01:00] Could not set requestId.
Rotation w50-12.12-19.12 has been created for schedule d9b93e0d-58e3-4be1-8bd6-63520b5579f9.
WARN[2022-11-01T15:40:09.506425+01:00] Could not set requestId.
Rotation w51-19.12-26.12 has been created for schedule d9b93e0d-58e3-4be1-8bd6-63520b5579f9.
WARN[2022-11-01T15:40:09.948043+01:00] Could not set requestId.
Rotation w52-26.12-2.1 has been created for schedule d9b93e0d-58e3-4be1-8bd6-63520b5579f9.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.