Giter VIP home page Giter VIP logo

opsgenie-scheduler-creator's People

Contributors

dependabot[bot] avatar y0rune avatar

Watchers

 avatar

opsgenie-scheduler-creator's Issues

Add const values instead of strings

        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")

Create makefile

Please create a makefile for easier run / build / tests / create releases

Create a releases

Create a release for:

  • amd64
  • arm
  • arm64
  • darwin

Please update the docs after it.

Create function for creating the team

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

Remove warnings when rotation has been created

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.