Skip to content
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

fix: Removed mandatory GitHub token on artifacts downloading #1761

Merged
merged 8 commits into from
Mar 31, 2021

Conversation

adamfilipow92
Copy link
Contributor

@adamfilipow92 adamfilipow92 commented Mar 29, 2021

Fixes #1695

Test Plan

How do we know the code works?

Flank should download test artifacts without any exceptions when GitHub token is not set in environment variables.

  • Unit tested

@github-actions
Copy link
Contributor

github-actions bot commented Mar 29, 2021

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@adamfilipow92 adamfilipow92 marked this pull request as draft March 29, 2021 17:10
@github-actions
Copy link
Contributor

github-actions bot commented Mar 30, 2021

Timestamp: 2021-03-30 17:04:35
Buildscan url for ubuntu-workflow run 702203484
https://gradle.com/s/necgltg3fh72u

@adamfilipow92 adamfilipow92 marked this pull request as ready for review March 30, 2021 17:00
Comment on lines +3 to +4
fun getEnv(key: String, default: String? = null): String =
System.getenv(key) ?: default ?: throw RuntimeException("Environment variable '$key' not found!")
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: With this function changed we could also update

runCatching { getEnv("HEAD_REF") }
and make it a bit simpler

@mergify mergify bot merged commit af10786 into master Mar 31, 2021
@mergify mergify bot deleted the 1695-fix-mandatory-gh-token branch March 31, 2021 07:43
@github-actions github-actions bot locked and limited conversation to collaborators Mar 31, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mandatory GITHUB_TOKEN even for running a test locally
5 participants