Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

team.go: add support for private teams. #116

Merged
merged 1 commit into from
Oct 25, 2023

Conversation

lomkju
Copy link
Contributor

@lomkju lomkju commented Jan 12, 2023

What

Adds support for creating private teams in pagerduty.

Why

In accounts with advance permissions enabled the key default_role must be set in the request payload.
This package needs to be patched so that we can update the pagerduty provider which uses this package .
The payload key is not documented on the website, it was found using developer tools on the browser.
Setting default_role: none results in a private team.

Test cURL

curl --request POST \
  --url https://api.pagerduty.com/teams \
  --header 'Accept: application/vnd.pagerduty+json;version=2' \
  --header 'Authorization: Token token=xxxxxxxxxxxx' \
  --header 'Content-Type: application/json' \
  --data '{
  "team": {
    "type": "team",
    "name": "arjun-test",
    "description": "The engineering team",
    "default_role": "none"
  }
}'

Ref:

@lomkju lomkju force-pushed the add_support_for_private_teams branch from 1a579a0 to 10c8eb6 Compare February 2, 2023 02:32
Copy link
Contributor

@johncoleman83 johncoleman83 left a comment

Choose a reason for hiding this comment

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

@imjaroiswebdev , this LGTM. If you test out the API default_role is provided in the results of this API, and it is currently documented in the REST API docs as a valid request payload param. I suggest adding this as a lot of customers depend on private team and it is in the knowledge base docs here.

Copy link
Collaborator

@imjaroiswebdev imjaroiswebdev left a comment

Choose a reason for hiding this comment

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

Hey @lomkju thank you! 🎉 This LGTM too @johncoleman83 thanks both for your contribution.

@imjaroiswebdev imjaroiswebdev merged commit 1492ec5 into heimweh:master Oct 25, 2023
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.

3 participants