<commit_before>package google

func canonicalizeServiceScope(scope string) string {
	// This is a convenience map of short names used by the gcloud tool
	// to the GCE auth endpoints they alias to.
	scopeMap := map[string]string{
		"bigquery":        "https://www.googleapis.com/auth/bigquery",
		"cloud-platform":  "https://www.googleapis.com/auth/cloud-platform",
		"compute-ro":      "https://www.googleapis.com/auth/compute.readonly",
		"compute-rw":      "https://www.googleapis.com/auth/compute",
		"datastore":       "https://www.googleapis.com/auth/datastore",
		"logging-write":   "https://www.googleapis.com/auth/logging.write",
		"monitoring":      "https://www.googleapis.com/auth/monitoring",
		"sql":             "https://www.googleapis.com/auth/sqlservice",
		"sql-admin":       "https://www.googleapis.com/auth/sqlservice.admin",
		"storage-full":    "https://www.googleapis.com/auth/devstorage.full_control",
		"storage-ro":      "https://www.googleapis.com/auth/devstorage.read_only",
		"storage-rw":      "https://www.googleapis.com/auth/devstorage.read_write",
		"taskqueue":       "https://www.googleapis.com/auth/taskqueue",
		"useraccounts-ro": "https://www.googleapis.com/auth/cloud.useraccounts.readonly",
		"useraccounts-rw": "https://www.googleapis.com/auth/cloud.useraccounts",
		"userinfo-email":  "https://www.googleapis.com/auth/userinfo.email",
	}

	if matchedUrl, ok := scopeMap[scope]; ok {
		return matchedUrl
	} else {
		return scope
	}
}<commit_msg>providers/google: add pubsub auth endpoint #3803<commit_after>package google

func canonicalizeServiceScope(scope string) string {
	// This is a convenience map of short names used by the gcloud tool
	// to the GCE auth endpoints they alias to.
	scopeMap := map[string]string{
		"bigquery":        "https://www.googleapis.com/auth/bigquery",
		"cloud-platform":  "https://www.googleapis.com/auth/cloud-platform",
		"compute-ro":      "https://www.googleapis.com/auth/compute.readonly",
		"compute-rw":      "https://www.googleapis.com/auth/compute",
		"datastore":       "https://www.googleapis.com/auth/datastore",
		"logging-write":   "https://www.googleapis.com/auth/logging.write",
		"monitoring":      "https://www.googleapis.com/auth/monitoring",
		"pubsub":          "https://www.googleapis.com/auth/pubsub",
		"sql":             "https://www.googleapis.com/auth/sqlservice",
		"sql-admin":       "https://www.googleapis.com/auth/sqlservice.admin",
		"storage-full":    "https://www.googleapis.com/auth/devstorage.full_control",
		"storage-ro":      "https://www.googleapis.com/auth/devstorage.read_only",
		"storage-rw":      "https://www.googleapis.com/auth/devstorage.read_write",
		"taskqueue":       "https://www.googleapis.com/auth/taskqueue",
		"useraccounts-ro": "https://www.googleapis.com/auth/cloud.useraccounts.readonly",
		"useraccounts-rw": "https://www.googleapis.com/auth/cloud.useraccounts",
		"userinfo-email":  "https://www.googleapis.com/auth/userinfo.email",
	}

	if matchedURL, ok := scopeMap[scope]; ok {
		return matchedURL
	}

	return scope
}
{'fraction_non_alphanumeric': 0.17320261437908496, 'fraction_numerical': 0.00130718954248366, 'mean_word_length': 3.6519756838905777, 'pattern_counts': {'":': 33, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 33, 'lorem ipsum': 0, 'www.': 33, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6153198', 'n_tokens_mistral': 1065, 'n_tokens_neox': 983, 'n_words': 148}