+
Skip to content

Add download token and sha to ListRunnerApplicationDownloads #1862

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

lupine86
Copy link
Contributor

@lupine86 lupine86 commented May 5, 2021

See #1861

When using Git Hub Enterprise APIs a temp_download_token is included when querying runner downloads via the API.

This PR updates the response structure to include the necessary token and SHA checksum.

>:~$ curl -k -H "Authorization: token $TOKEN" -H "Accept: application/vnd.github.v3+json" https://HOST/api/v3/orgs/actions-sauron/actions/runners/downloads
[
  {
    "os": "osx",
    "architecture": "x64",
    "download_url": "https://HOST/_services/pipelines/_apis/distributedtask/packagedownload/agent/osx-x64/2.277.1",
    "filename": "actions-runner-osx-x64-2.277.1.tar.gz",
    "temp_download_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJ...",
    "sha256_checksum": "f1fa173889dc9036cd5294..."
  },
  {
    "os": "linux",
    "architecture": "x64",
    "download_url": "https://HOST/_services/pipelines/_apis/distributedtask/packagedownload/agent/linux-x64/2.277.1",
    "filename": "actions-runner-linux-x64-2.277.1.tar.gz",
    "temp_download_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1...",
    "sha256_checksum": "02d710fc9e0008e641274bb7da7fde61f7c9a..."
  },
  ...
]

@google-cla
Copy link

google-cla bot commented May 5, 2021

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added the cla: no label May 5, 2021
DownloadURL *string `json:"download_url,omitempty"`
Filename *string `json:"filename,omitempty"`
TempDownloadToken *string `json:"temp_download_token,omitempty"`
Sha256Checksum *string `json:"sha256_checksum,omitempty"`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be consistent with the rest of the repo, let's please change this to SHA256Checksum.

@lupine86
Copy link
Contributor Author

lupine86 commented May 5, 2021

@googlebot I signed it!

@google-cla google-cla bot added cla: yes Indication that the PR author has signed a Google Contributor License Agreement. and removed cla: no labels May 5, 2021
@gmlewis
Copy link
Collaborator

gmlewis commented May 5, 2021

Thank you, @lupine86 !
Please run go generate ./... and commit/push (not force-push) the changes to this PR.
(More details can be found in CONTRIBUTING.md.)

@codecov
Copy link

codecov bot commented May 5, 2021

Codecov Report

Merging #1862 (554c464) into master (576e460) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1862   +/-   ##
=======================================
  Coverage   97.65%   97.65%           
=======================================
  Files         105      105           
  Lines        6769     6769           
=======================================
  Hits         6610     6610           
  Misses         86       86           
  Partials       73       73           
Impacted Files Coverage Δ
github/actions_runners.go 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 576e460...554c464. Read the comment docs.

Copy link
Collaborator

@gmlewis gmlewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @lupine86 !
LGTM.
Merging.

@gmlewis gmlewis merged commit b1b5e4e into google:master May 5, 2021
This was referenced May 21, 2021
This was referenced Jul 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Indication that the PR author has signed a Google Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载