Send ticket information with activation requests - #10
Merged
Merged
Conversation
A PIM policy can require ticket information on activation, and a request without it is refused. Add --ticket-number and --ticket-system to role activate and group activate, sent as ticketInfo. When neither is given the field is left out, so requests under other policies are unchanged.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #10 +/- ##
==========================================
+ Coverage 97.04% 97.07% +0.02%
==========================================
Files 7 8 +1
Lines 542 547 +5
==========================================
+ Hits 526 531 +5
Misses 16 16 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A PIM policy can require ticket information on activation ("Require ticket information on activation"). A request that does not carry it is refused, so assignments under such a policy could not be activated with azpim at all.
Changes
role activateandgroup activatetake--ticket-numberand--ticket-system, sent asticketInfo(ticketNumber/ticketSystem) on the schedule request--ticket-systemcan also come from$AZPIM_TICKET_SYSTEM, since it rarely changesticketInfois left out of the request entirely, so activations under policies that do not ask for a ticket are requested exactly as before; when only one is given, only that one is sentPIM records both values with the request but checks neither against anything, so they are free text. azpim does not try to validate them either.
Testing
go vet,go test,golangci-lintpass