Skip to content

Send ticket information with activation requests - #10

Merged
winebarrel merged 1 commit into
mainfrom
ticket-info
Sep 25, 2026
Merged

winebarrel merged 1 commit into
mainfrom
ticket-info

Conversation

@winebarrel

Copy link
Copy Markdown
Owner

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 activate and group activate take --ticket-number and --ticket-system, sent as ticketInfo (ticketNumber / ticketSystem) on the schedule request
  • --ticket-system can also come from $AZPIM_TICKET_SYSTEM, since it rarely changes
  • When neither is given, ticketInfo is 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 sent
  • README gains a "Tickets" section

PIM 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

  • Unit tests for both areas: the ticket is sent when given, omitted when not, and a partial ticket sends only what was given
  • go vet, go test, golangci-lint pass
  • Not yet exercised against a real tenant with the policy enabled

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

codecov Bot commented Sep 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.07%. Comparing base (d0f246c) to head (80c2f66).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@winebarrel
winebarrel merged commit 70ba0fa into main Sep 25, 2026
4 checks passed
@winebarrel
winebarrel deleted the ticket-info branch September 25, 2026 07:48
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.

1 participant