Skip to content

Commit 68de171

Browse files
committed
Add additional enabling/disabling IP allow lists
Added new queries to separately enable and disable IP allow lists for GitHub Apps only and IP addresses only.
1 parent 10b3fb7 commit 68de171

4 files changed

Lines changed: 68 additions & 0 deletions
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# This query is used to disable the IP allow list feature. This will apply to GitHub Apps only.
2+
# This can be used on both organizations and enterprise accounts.
3+
#
4+
# The `OWNER_ID` is the ID of the organization or enterprise account. You can
5+
# get the ID of an organization or enterprise account by executing either of
6+
# the following queries and referring to the value from `owner_id` field:
7+
#
8+
# - organizations: https://github.com/github/platform-samples/blob/master/graphql/queries/org-get-ip-allow-list.graphql
9+
# - enterprise accounts: https://github.com/github/platform-samples/blob/master/graphql/queries/enterprise-get-ip-allow-list.graphql
10+
11+
mutation DisableIPAllowListForGitHubAppsOnly {
12+
updateIpAllowListForInstalledAppsEnabledSetting(
13+
input: { ownerId: "OWNER_ID", settingValue: DISABLED }
14+
) {
15+
clientMutationId
16+
}
17+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# This query is used to disable the IP allow list feature. This will apply to IP addresses only.
2+
# This can be used on both organizations and enterprise accounts.
3+
#
4+
# The `OWNER_ID` is the ID of the organization or enterprise account. You can
5+
# get the ID of an organization or enterprise account by executing either of
6+
# the following queries and referring to the value from `owner_id` field:
7+
#
8+
# - organizations: https://github.com/github/platform-samples/blob/master/graphql/queries/org-get-ip-allow-list.graphql
9+
# - enterprise accounts: https://github.com/github/platform-samples/blob/master/graphql/queries/enterprise-get-ip-allow-list.graphql
10+
11+
mutation DisableAllowListForIpsOnly {
12+
updateIpAllowListEnabledSetting(
13+
input: { ownerId: "OWNER_ID", settingValue: DISABLED }
14+
) {
15+
clientMutationId
16+
}
17+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# This query is used to enable the IP allow list feature. This will apply to GitHub Apps only.
2+
# This can be used on both organizations and enterprise accounts.
3+
#
4+
# The `OWNER_ID` is the ID of the organization or enterprise account. You can
5+
# get the ID of an organization or enterprise account by executing either of
6+
# the following queries and referring to the value from `owner_id` field:
7+
#
8+
# - organizations: https://github.com/github/platform-samples/blob/master/graphql/queries/org-get-ip-allow-list.graphql
9+
# - enterprise accounts: https://github.com/github/platform-samples/blob/master/graphql/queries/enterprise-get-ip-allow-list.graphql
10+
11+
mutation EnableIPAllowListForGitHubAppsOnly {
12+
updateIpAllowListForInstalledAppsEnabledSetting(
13+
input: { ownerId: "OWNER_ID", settingValue: ENABLED }
14+
) {
15+
clientMutationId
16+
}
17+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# This query is used to enable the IP allow list feature. This will apply to IP addresses only.
2+
# This can be used on both organizations and enterprise accounts.
3+
#
4+
# The `OWNER_ID` is the ID of the organization or enterprise account. You can
5+
# get the ID of an organization or enterprise account by executing either of
6+
# the following queries and referring to the value from `owner_id` field:
7+
#
8+
# - organizations: https://github.com/github/platform-samples/blob/master/graphql/queries/org-get-ip-allow-list.graphql
9+
# - enterprise accounts: https://github.com/github/platform-samples/blob/master/graphql/queries/enterprise-get-ip-allow-list.graphql
10+
11+
mutation EnableAllowListForIpsOnly {
12+
updateIpAllowListEnabledSetting(
13+
input: { ownerId: "OWNER_ID", settingValue: ENABLED }
14+
) {
15+
clientMutationId
16+
}
17+
}

0 commit comments

Comments
 (0)