Skip to content

Instantly share code, notes, and snippets.

Created Dec 20, 2021
What would you like to do?
# Add @rust-sig group with "commit" access to one or multiple packages
# Script accepts package names as command line arguments (and strips ","
# characters from arguments, so copy-pasting comma-separated lists of package
# names from report emails is supported, as well).
import sys
import requests
TOKEN = ""
def main():
packages = [package.strip(",") for package in sys.argv[1:]]
for package in packages:
print(f" - adding @rust-sig to {package} ...")
url = f"{package}/git/modifyacls"
data = {
"user_type": "group",
"name": "rust-sig",
"acl": "commit",
headers = {
"Authorization": f"token {TOKEN}",
"Content-Type": "application/x-www-form-urlencoded",
response =, data=data, headers=headers)
return 0
if __name__ == "__main__":
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment