Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

Randomize issue-claim time in the seed script #1731

Merged
merged 3 commits into from
Jan 29, 2021

Conversation

whaught
Copy link
Contributor

@whaught whaught commented Jan 29, 2021

Proposed Changes

  • Randomizes the issue to claim time in the seed script for more interesting stats

Release Note

Dev seed script randomizes the issue to claim time

@google-cla google-cla bot added the cla: yes Auto: added by CLA bot when all committers have signed a CLA. label Jan 29, 2021
@@ -404,7 +404,14 @@ func generateCodesAndStats(db *database.Database, realm *database.Realm) error {

app := randomDeviceAuthorizedApp()

token, err := db.VerifyCodeAndIssueToken(date, app, code, accept, 24*time.Hour)
// randomize issue to claim time
if rand.Intn(3) == 0 {
Copy link
Member

Choose a reason for hiding this comment

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

Please use percentChance

Copy link
Member

@sethvargo sethvargo left a comment

Choose a reason for hiding this comment

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

/lgtm

@google-oss-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sethvargo, whaught

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-robot google-oss-robot merged commit 79a1414 into google:main Jan 29, 2021
@whaught whaught deleted the ferngully branch January 29, 2021 21:50
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 31, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes Auto: added by CLA bot when all committers have signed a CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants