Azure / azure-sdk-tools

Tools repository leveraged by the Azure SDK team.
MIT License
111 stars 176 forks source link

[Asset Sync] Add an `assets.json` field that links directly to a package's assets #5774

Open mccoyp opened 1 year ago

mccoyp commented 1 year ago

Currently, the "golden path" for a user to find their library's assets is to:

  1. Open their assets.json file
  2. Manually go to the repository denoted by the AssetsRepo
  3. Manually select the repo tag denoted by the Tag

Instead, we can provide a direct link to the repo tag and eliminate steps 2 and 3 by using currently-available information. For example, the assets.json file for Python's azure-keyvault-secrets currently looks like:

{
  "AssetsRepo": "Azure/azure-sdk-assets",
  "AssetsRepoPrefixPath": "python",
  "TagPrefix": "python/keyvault/azure-keyvault-secrets",
  "Tag": "python/keyvault/azure-keyvault-secrets_fc5951fbe4"
}

By using the AssetsRepo and Tag fields, we can generate a direct link to the tag with

https://github.com/{AssetsRepo}/tree/{Tag}

and in the example above's case, add an extra field:

"AssetsLocation": "https://github.com/Azure/azure-sdk-assets/tree/python/keyvault/azure-keyvault-secrets_fc5951fbe4"
benbp commented 1 year ago

This is an excellent suggestion and will tie in nicely to https://github.com/Azure/azure-sdk-tools/issues/4652 for something like test-proxy config github