{"id":37019905,"url":"https://github.com/taskcluster/taskcluster-lib-urls","last_synced_at":"2026-01-14T02:13:52.011Z","repository":{"id":32300792,"uuid":"132170789","full_name":"taskcluster/taskcluster-lib-urls","owner":"taskcluster","description":"Taskcluster URL Building Library","archived":false,"fork":false,"pushed_at":"2026-01-12T10:13:15.000Z","size":666,"stargazers_count":1,"open_issues_count":5,"forks_count":7,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-01-12T18:52:34.862Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/taskcluster.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-05-04T17:38:42.000Z","updated_at":"2026-01-12T10:12:38.000Z","dependencies_parsed_at":"2024-06-19T02:41:26.976Z","dependency_job_id":"7f06e58d-edc8-4218-a3b8-5e03e2f0f70f","html_url":"https://github.com/taskcluster/taskcluster-lib-urls","commit_stats":{"total_commits":126,"total_committers":12,"mean_commits":10.5,"dds":0.5793650793650793,"last_synced_commit":"1e49feded73fdde2ec6e09257a5ef64687eacd9f"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/taskcluster/taskcluster-lib-urls","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taskcluster%2Ftaskcluster-lib-urls","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taskcluster%2Ftaskcluster-lib-urls/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taskcluster%2Ftaskcluster-lib-urls/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taskcluster%2Ftaskcluster-lib-urls/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/taskcluster","download_url":"https://codeload.github.com/taskcluster/taskcluster-lib-urls/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taskcluster%2Ftaskcluster-lib-urls/sbom","scorecard":{"id":768531,"data":{"date":"2025-08-11","repo":{"name":"github.com/taskcluster/taskcluster-lib-urls","commit":"d85613434aeac7a4152e5df1102fc8e5b5a82b6a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.7,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":10,"reason":"all changesets reviewed","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Mozilla Public License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/taskcluster/.github/SECURITY.md:1","Info: Found linked content: github.com/taskcluster/.github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/taskcluster/.github/SECURITY.md:1","Info: Found text in security policy: github.com/taskcluster/.github/SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":1,"reason":"9 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-mjmj-j48q-9wg2","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-qrpm-p2h7-hrv2","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T01:34:20.053Z","repository_id":32300792,"created_at":"2025-08-23T01:34:20.054Z","updated_at":"2025-08-23T01:34:20.054Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28408711,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-14T02:13:51.194Z","updated_at":"2026-01-14T02:13:51.999Z","avatar_url":"https://github.com/taskcluster.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Taskcluster URL Building Library\n\n[![License](https://img.shields.io/badge/license-MPL%202.0-orange.svg)](http://mozilla.org/MPL/2.0)\n\nA simple library to generate URLs for various Taskcluster resources across our various deployment methods.\n\nThis serves as both a simple shim for projects that use JavaScript but also is the reference implementation for\nhow we define these paths.\n\nURLs are defined in the '[Taskcluster URL Format](https://docs.taskcluster.net/docs/reference/url-structure).\n\nChangelog\n---------\nView the changelog on the [releases page](https://github.com/taskcluster/taskcluster-lib-urls/releases).\n\nRequirements\n------------\n\nThis is tested on and should run on any of Node.js `{8, 10}`.\n\nGeneral Usage\n-------------\n\nWhile the capitalization and punctunation of the function names varies depending on the language, each language provides the following methods:\n\n| method | result |\n| --- | --- |\n| api(rootUrl, service, version, path) -\u003e | `\u003crootUrl\u003e/api/\u003cservice\u003e/\u003cversion\u003e/\u003cpath\u003e` |\n| apiReference(rootUrl, service, version) -\u003e | `\u003crootUrl\u003e/references/\u003cservice\u003e/\u003cversion\u003e/api.json` |\n| docs(rootUrl, path) -\u003e | `\u003crootUrl\u003e/docs/\u003cpath\u003e` |\n| exchangeReference(rootUrl, service, version) -\u003e | `\u003crootUrl\u003e/references/\u003cservice\u003e/\u003cversion\u003e/exchanges.json` |\n| schema(rootUrl, service, schema) -\u003e | `\u003crootUrl\u003e/schemas/\u003cservice\u003e/\u003cschema\u003e` |\n| apiSchema(rootUrl, version) -\u003e | `\u003crootUrl\u003e/schemas/common/api-reference-\u003cversion\u003e.json` |\n| exchangesSchema(rootUrl, version) -\u003e | `\u003crootUrl\u003e/schemas/common/exchanges-reference-\u003cversion\u003e.json` |\n| apiManifestSchema(rootUrl, version) -\u003e | `\u003crootUrl\u003e/schemas/common/manifest-\u003cversion\u003e.json` |\n| metadataMchema(rootUrl) -\u003e | `\u003crootUrl\u003e/schemas/common/metadata-metaschema.json` |\n| ui(rootUrl, path) -\u003e | `\u003crootUrl\u003e/\u003cpath\u003e` |\n| apiManifest(rootUrl) -\u003e | `\u003crootUrl\u003e/references/manifest.json` |\n| normalizeRootUrl(rootUrl) -\u003e | the normal form of the given rootUrl |\n| testRootUrl() -\u003e | `https://tc-tests.example.com` |\n\n`testRootUrl()` is used to share a common fake `rootUrl` between various Taskcluster mocks in testing.\nThe URL does not resolve.\n\nJS Usage\n--------\n[![Node.js Build Status](https://travis-ci.org/taskcluster/taskcluster-lib-urls.svg?branch=main)](https://travis-ci.org/taskcluster/taskcluster-lib-urls)\n[![npm](https://img.shields.io/npm/v/taskcluster-lib-urls.svg?maxAge=2592000)](https://www.npmjs.com/package/taskcluster-lib-urls)\n\nThis package exports several methods for generating URLs conditionally based on\na root URL, as well as a few helper classes for generating URLs for a pre-determined\nroot URL:\n\n* `api(rootUrl, service, version, path)` -\u003e `String`\n* `apiReference(rootUrl, service, version)` -\u003e `String`\n* `docs(rootUrl, path)` -\u003e `String`\n* `exchangeReference(rootUrl, service, version)` -\u003e `String`\n* `schema(rootUrl, service, schema)` -\u003e `String`\n* `apiManifestSchema(rootUrl, version)` -\u003e `String`\n* `apiReferenceSchema(rootUrl, version)` -\u003e `String`\n* `exchangesReferenceSchema(rootUrl, version)` -\u003e `String`\n* `metadataMetaschema(rootUrl)` -\u003e `String`\n* `ui(rootUrl, path)` -\u003e `String`\n* `apiManifest(rootUrl)` -\u003e `String`\n* `testRootUrl()` -\u003e `String`\n* `withRootUrl(rootUrl)` -\u003e `Class` instance for above methods\n* `normalizeRootUrl(rootUrl)` -\u003e `String` (the \"normalized\" form of the given rootUrl)\n\n```js\n// Specifying root URL every time:\nconst libUrls = require('taskcluster-lib-urls');\n\nlibUrls.api(rootUrl, 'auth', 'v1', 'foo/bar');\nlibUrls.schema(rootUrl, 'auth', 'v1/foo.yml'); // Note that schema names have versions in them\nlibUrls.apiReference(rootUrl, 'auth', 'v1');\nlibUrls.exchangeReference(rootUrl, 'auth', 'v1');\nlibUrls.ui(rootUrl, 'foo/bar');\nlibUrls.apiManifest(rootUrl);\nlibUrls.docs(rootUrl, 'foo/bar');\n```\n\n```js\n// Specifying root URL in advance:\nconst libUrls = require('taskcluster-lib-urls');\n\nconst urls = libUrls.withRoot(rootUrl);\n\nurls.api('auth', 'v1', 'foo/bar');\nurls.schema('auth', 'v1/foo.yml');\nurls.apiReference('auth', 'v1');\nurls.exchangeReference('auth', 'v1');\nurls.ui('foo/bar');\nurls.apiManifest();\nurls.docs('foo/bar');\n```\n\nIf you would like, you can set this up via [taskcluster-lib-loader](https://github.com/taskcluster/taskcluster-lib-loader) as follows:\n\n```js\n{\n  libUrlss: {\n    require: ['cfg'],\n    setup: ({cfg}) =\u003e withRootUrl(cfg.rootURl),\n  },\n}\n```\n\nTest with:\n\n```\nyarn install\nyarn test\n```\n\n\nGo Usage\n--------\n\n[![GoDoc](https://godoc.org/github.com/taskcluster/taskcluster-lib-urls?status.svg)](https://godoc.org/github.com/taskcluster/taskcluster-lib-urls)\n\nThe go package exports the following functions:\n\n```go\nfunc API(rootURL string, service string, version string, path string) string\nfunc APIReference(rootURL string, service string, version string) string\nfunc Docs(rootURL string, path string) string\nfunc ExchangeReference(rootURL string, service string, version string) string\nfunc Schema(rootURL string, service string, name string) string\nfunc APIManifestSchema(rootURL string, version string) string\nfunc APIReferenceSchema(rootURL string, version string) string\nfunc ExchangesReferenceSchema(rootURL string, version string) string\nfunc MetadataMetaschema(rootURL string) string\nfunc UI(rootURL string, path string) string\nfunc APIManifest(rootURL string) string\nfunc NormalizeRootURL(rootURL string) string\n```\n\nInstall with:\n\n```\ngo install ./..\n```\n\nTest with:\n\n```\ngo test -v ./...\n```\n\nPython Usage\n------------\n\nYou can install the python client with `pip install taskcluster-urls`;\n\n```python\nimport taskcluster_urls\n\ntaskcluster_urls.api(root_url, 'auth', 'v1', 'foo/bar')\ntaskcluster_urls.schema(root_url, 'auth', 'v1/foo.yml') # Note that schema names have versions in them\ntaskcluster_urls.api_manifest_schema(root_url, 'v1')\ntaskcluster_urls.api_reference_schema(root_url, 'v1')\ntaskcluster_urls.exchanges_reference_schema(root_url, 'v1')\ntaskcluster_urls.metadata_metaschema(root_url, 'v1')\ntaskcluster_urls.api_reference(root_url, 'auth', 'v1')\ntaskcluster_urls.exchange_reference(root_url, 'auth', 'v1')\ntaskcluster_urls.ui(root_url, 'foo/bar')\ntaskcluster_urls.apiManifest(root_url)\ntaskcluster_urls.docs(root_url, 'foo/bar')\ntaskcluster_urls.normalize_root_url(root_url)\ntaskcluster_urls.test_root_url()\n```\n\nTest with:\n\n```\ntox\n```\n\nJava Usage\n----------\n\n[![JavaDoc](https://img.shields.io/badge/javadoc-reference-blue.svg)](http://taskcluster.github.io/taskcluster-lib-urls/apidocs)\n\nIn order to use this library from your maven project, simply include it as a project dependency:\n\n```\n\u003cproject\u003e\n  ...\n  \u003cdependencies\u003e\n    ...\n    \u003cdependency\u003e\n      \u003cgroupId\u003eorg.mozilla.taskcluster\u003c/groupId\u003e\n      \u003cartifactId\u003etaskcluster-lib-urls\u003c/artifactId\u003e\n      \u003cversion\u003e1.0.0\u003c/version\u003e\n    \u003c/dependency\u003e\n  \u003c/dependencies\u003e\n\u003c/project\u003e\n```\n\nThe taskcluster-lib-urls artifacts are now available from the [maven central repository](http://central.sonatype.org/):\n\n* [Search Results](http://search.maven.org/#search|gav|1|g%3A%22org.mozilla.taskcluster%22%20AND%20a%3A%22taskcluster-lib-urls%22)\n* [Directory Listing](https://repo1.maven.org/maven2/org/mozilla/taskcluster/taskcluster-lib-urls/)\n\nTo use the library, do as follows:\n\n```java\nimport org.mozilla.taskcluster.urls.*;\n\n...\n\n    URLProvider urlProvider = URLs.provider(\"https://mytaskcluster.acme.org\");\n\n    String fooBarAPI        = urlProvider.api(\"auth\", \"v1\", \"foo/bar\");\n    String fooSchema        = urlProvider.schema(\"auth\", \"v1/foo.yml\"); // Note that schema names have versions in them\n    String apiSchema        = urlProvider.apiReferenceSchema(\"v1\");\n    String exchangesSchema  = urlProvider.exchangesReferenceSchema(\"v1\");\n    String manifestSchema   = urlProvider.apiManifestSchema(\"v1\");\n    String metaschema       = urlProvider.metadataMetaschema();\n    String authAPIRef       = urlProvider.apiReference(\"auth\", \"v1\");\n    String authExchangesRef = urlProvider.exchangeReference(\"auth\", \"v1\");\n    String uiFooBar         = urlProvider.ui(\"foo/bar\");\n    String apiManifest      = urlProvider.apiManifest();\n    String docsFooBar       = urlProvider.docs(\"foo/bar\");\n\n...\n```\n\nInstall with:\n\n```\nmvn install\n```\n\nTest with:\n\n```\nmvn test\n```\n\n\nReleasing\n---------\n\nNew releases should be tested on Travis and Taskcluster to allow for all supported versions of various languages to be tested. Once satisfied that it works, new versions should be created with\n`npm version` rather than by manually editing `package.json` and tags should be pushed to Github. \n\nMake the Node release first, as Python's version depends on its `package.json`.  This follows the typical tag-and-push-to-publish approach:\n\n```sh\n$ npm version minor  # or patch, or major\n$ git push upstream\n```\n\nOnce that's done, build the Python sdists (only possible by the [maintainers on pypi](https://pypi.org/project/taskcluster-urls/#files)):\n\n```sh\nrm -rf dist/*\npython setup.py sdist bdist_wheel\npython3 setup.py bdist_wheel\npip install twine\ntwine upload dist/*\n```\n\nMake sure to update [the changelog](https://github.com/taskcluster/taskcluster-lib-urls/releases)!\n\nLicense\n-------\n\n[Mozilla Public License Version 2.0](https://github.com/taskcluster/taskcluster-lib-urls/blob/main/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaskcluster%2Ftaskcluster-lib-urls","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftaskcluster%2Ftaskcluster-lib-urls","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaskcluster%2Ftaskcluster-lib-urls/lists"}