unknwon

unknwon

Wild kid in the junkyard.

Member Since 9 years ago

@sourcegraph, Shanghai, China

Experience Points
1.19w
follower
Lessons Completed
6
follow
Lessons Completed
8
stars
Best Reply Awards
39
repos

2859 contributions in the last year

Pinned
⚡ Gogs is a painless self-hosted Git service
⚡ Universal code search (self-hosted)
⚡ A fantastic modular Go web framework boiled with dependency injection
⚡ Package macaron is a high productive and modular web framework in Go.
⚡ Package ini provides INI file read and write functionality in Go
⚡ 《The Way to Go》中文译本,中文正式名《Go 入门指南》
Activity
Jan
27
1 day ago
push

unknwon push sourcegraph/sourcegraph

unknwon
unknwon

Use pink instead of orange for JSON keys in light theme (#30186)

unknwon
unknwon

Improve acquisition CTA – front end (#30169)

  • Improve acquisition CTA

Co-authored-by: David Veszelovszki [email protected]

  • Fixed a space.

  • fixup! Improve acquisition CTA

Co-authored-by: Erzhan Torokulov [email protected]

unknwon
unknwon

Merge branch 'main' of github.com:sourcegraph/sourcegraph into jc/CLOUD-209-github-app-slug

commit sha: 3308dba5e671db42006e6b4c7858792e93de1ee2

push time in 19 hours ago
pull request

unknwon merge to sourcegraph/sourcegraph

unknwon
unknwon

[cloud] Add migration to support email & expiring invitations

Adding 2 columns to the org_invitations table: recipient_email - the email of the recipient of the invitation expires_at - the date when the invitation is considered to be expired

open pull request

unknwon wants to merge sourcegraph/sourcegraph

unknwon
unknwon

[cloud] Add migration to support email & expiring invitations

Adding 2 columns to the org_invitations table: recipient_email - the email of the recipient of the invitation expires_at - the date when the invitation is considered to be expired

unknwon
unknwon

nit:

  ADD COLUMN IF NOT EXISTS recipient_email CITEXT,
  ADD COLUMN IF NOT EXISTS expires_at timestamp with time zone;
pull request

unknwon merge to sourcegraph/sourcegraph

unknwon
unknwon

[cloud] Add migration to support email & expiring invitations

Adding 2 columns to the org_invitations table: recipient_email - the email of the recipient of the invitation expires_at - the date when the invitation is considered to be expired

unknwon
unknwon

Did you use sg migration xxx? I thought it would generate the front matter (currently just its parent migration ID), e.g.

https://github.com/sourcegraph/sourcegraph/blob/34925c49cb7e964071830e8719f89ca724e8c421/migrations/frontend/1528395968_track_fork_namespace_on_spec.up.sql#L1-L3

pull request

unknwon merge to sourcegraph/sourcegraph

unknwon
unknwon

[cloud] Add migration to support email & expiring invitations

Adding 2 columns to the org_invitations table: recipient_email - the email of the recipient of the invitation expires_at - the date when the invitation is considered to be expired

unknwon
unknwon

Did you use sg migration xxx? I thought it would generate the front matter (currently just its parent migration ID), e.g.

https://github.com/sourcegraph/sourcegraph/blob/34925c49cb7e964071830e8719f89ca724e8c421/migrations/frontend/1528395968_track_fork_namespace_on_spec.up.sql#L1-L3

Activity icon
issue

unknwon issue comment sourcegraph/sourcegraph

unknwon
unknwon

[CLOUD-209] Add site config option for GitHub App slug

For CLOUD-209, we need the GitHub App slug as part of the URL construction for redirecting users to the corresponding GitHub App installation page. Thus adding a new config option under the site config dotcom > githubApp.cloud > slug, and expose its value to the JSContext for our web app to read.


Jira: CLOUD-209

unknwon
unknwon

CI is not passing because we can't upload to Honeycomb (after 4 retries)... I don't know what to do, I'll try again hours later.

pull request

unknwon pull request sourcegraph/sourcegraph

unknwon
unknwon

[CLOUD-209] Add site config option for GitHub App slug

For CLOUD-209, we need the GitHub App slug as part of the URL construction for redirecting users to the corresponding GitHub App installation page. Thus adding a new config option under the site config dotcom > githubApp.cloud > slug, and expose its value to the JSContext for our web app to read.


Jira: CLOUD-209

Activity icon
created branch

unknwon in sourcegraph/sourcegraph create branch jc/CLOUD-209-github-app-slug

createdAt 1 day ago
pull request

unknwon merge to sourcegraph/sourcegraph

unknwon
unknwon

migrations: Simplify tests comparing definition instances

Pulled from #29831.

pull request

unknwon merge to sourcegraph/sourcegraph

unknwon
unknwon

migrations: Make definition-by-id lookup constant-time

Pulled from #29831.

pull request

unknwon merge to sourcegraph/sourcegraph

unknwon
unknwon

chore: Reorganize `migration/cliutil` package

Pulled from #29831. Reorganies the code in cliutil into different files.

pull request

unknwon merge to sourcegraph/sourcegraph

unknwon
unknwon

chore: Inline code into `migration/.../runner.go`

Pulled from #29831. Inlines internal/database/migration/runner/visitor.go into internal/database/migration/runner/runner.go.

Jan
26
2 days ago
open pull request

unknwon wants to merge sourcegraph/sourcegraph

unknwon
unknwon

chore: Simplify embed files

Pulled from #29831.

unknwon
unknwon

What about //go:embed **/*.sql **/*.yaml if it works?

open pull request

unknwon wants to merge sourcegraph/sourcegraph

unknwon
unknwon

chore: Simplify embed files

Pulled from #29831.

unknwon
unknwon

Is possible to have **/*.sql? I guess no since last time tried in other places... but just want to ask :D

push

unknwon push sourcegraph/sourcegraph

unknwon
unknwon

[CLOUD-202] Enforce feature flag check for the GitHub App setup handler (#29675)

commit sha: 8a14ba6002adae9c4021ee9f8a88785e42e7adda

push time in 1 day ago
Activity icon
delete

unknwon in sourcegraph/sourcegraph delete branch jc/CLOUD-202-create-feature-flag-for-github-app-integration

deleted time in 1 day ago
pull request

unknwon pull request sourcegraph/sourcegraph

unknwon
unknwon

[CLOUD-202] Enforce feature flag check for the GitHub App setup handler

This PR adds a feature flag check for the Sourcegraph Cloud GitHub App setup handler.

An error is displayed for organizations without having the feature flag:

CleanShot 2022-01-13 at 14 52 25@2x

(the response string in the screenshot is outdated, but the behavior is the same)

Testing

For testing locally, please follow the local testing guide.


Jira: CLOUD-202

open pull request

unknwon wants to merge sourcegraph/sourcegraph

unknwon
unknwon

[CLOUD-202] Enforce feature flag check for the GitHub App setup handler

This PR adds a feature flag check for the Sourcegraph Cloud GitHub App setup handler.

An error is displayed for users without having the feature flag:

CleanShot 2022-01-13 at 14 52 25@2x

(the response string in the screenshot is outdated, but the behavior is the same)

Testing

For testing locally, please follow the local testing guide.


Jira: CLOUD-202

pull request

unknwon merge to sourcegraph/sourcegraph

unknwon
unknwon

[CLOUD-202] Enforce feature flag check for the GitHub App setup handler

This PR adds a feature flag check for the Sourcegraph Cloud GitHub App setup handler.

An error is displayed for users without having the feature flag:

CleanShot 2022-01-13 at 14 52 25@2x

(the response string in the screenshot is outdated, but the behavior is the same)

Testing

For testing locally, please follow the local testing guide.


Jira: CLOUD-202

push

unknwon push gogs/gogs

unknwon
unknwon

mod: bump github.com/prometheus/client_golang from 1.11.0 to 1.12.0 (#6745)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit sha: 5e8444ed0fcc811c537af1f39a82f03e9e2dc753

push time in 2 days ago
Activity icon
delete

unknwon in gogs/gogs delete branch dependabot/go_modules/github.com/prometheus/client_golang-1.12.0

deleted time in 2 days ago
pull request

unknwon pull request gogs/gogs

unknwon
unknwon

mod: bump github.com/prometheus/client_golang from 1.11.0 to 1.12.0

Bumps github.com/prometheus/client_golang from 1.11.0 to 1.12.0.

Release notes

Sourced from github.com/prometheus/client_golang's releases.

1.12.0 / 2022-01-19

  • [CHANGE] example/random: Move flags and metrics into main() #935
  • [FEATURE] API client: Support wal replay status api #944
  • [FEATURE] Use the runtime/metrics package for the Go collector for 1.17+ #955
  • [ENHANCEMENT] API client: Update /api/v1/status/tsdb to include headStats #925
  • [ENHANCEMENT] promhttp: Check validity of method and code label values #962

What's Changed

New Contributors

Full Changelog: https://github.com/prometheus/client_golang/compare/v1.11.0...v1.12.0

Changelog

Sourced from github.com/prometheus/client_golang's changelog.

1.12.0 / 2022-01-19

  • [CHANGE] example/random: Move flags and metrics into main() #935
  • [FEATURE] API client: Support wal replay status api #944
  • [FEATURE] Use the runtime/metrics package for the Go collector for 1.17+ #955
  • [ENHANCEMENT] API client: Update /api/v1/status/tsdb to include headStats #925
  • [ENHANCEMENT] promhttp: Check validity of method and code label values #962
Commits
  • 0108796 Cut v1.12.0 (#966)
  • 5bd9ee5 go.*: Update dependencies (#965)
  • 9075cdf promhttp: Check validity of method and code label values (#962)
  • 22da949 Use the runtime/metrics package for the Go collector for 1.17+ (#955)
  • dc1559e Update /api/v1/status/tsdb to include headStats (#925)
  • e6e54e8 Merge pull request #944 from yeya24/add-wal-replay-status
  • 98fbd99 Merge pull request #952 from prometheus/repo_sync
  • 70a41d5 Update common Prometheus files
  • dbf420e Merge pull request #928 from prometheus/repo_sync
  • 1d09783 Merge pull request #950 from mrueg/go-1.17
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
pull request

unknwon merge to gogs/gogs

unknwon
unknwon

mod: bump github.com/prometheus/client_golang from 1.11.0 to 1.12.0

Bumps github.com/prometheus/client_golang from 1.11.0 to 1.12.0.

Release notes

Sourced from github.com/prometheus/client_golang's releases.

1.12.0 / 2022-01-19

  • [CHANGE] example/random: Move flags and metrics into main() #935
  • [FEATURE] API client: Support wal replay status api #944
  • [FEATURE] Use the runtime/metrics package for the Go collector for 1.17+ #955
  • [ENHANCEMENT] API client: Update /api/v1/status/tsdb to include headStats #925
  • [ENHANCEMENT] promhttp: Check validity of method and code label values #962

What's Changed

New Contributors

Full Changelog: https://github.com/prometheus/client_golang/compare/v1.11.0...v1.12.0

Changelog

Sourced from github.com/prometheus/client_golang's changelog.

1.12.0 / 2022-01-19

  • [CHANGE] example/random: Move flags and metrics into main() #935
  • [FEATURE] API client: Support wal replay status api #944
  • [FEATURE] Use the runtime/metrics package for the Go collector for 1.17+ #955
  • [ENHANCEMENT] API client: Update /api/v1/status/tsdb to include headStats #925
  • [ENHANCEMENT] promhttp: Check validity of method and code label values #962
Commits
  • 0108796 Cut v1.12.0 (#966)
  • 5bd9ee5 go.*: Update dependencies (#965)
  • 9075cdf promhttp: Check validity of method and code label values (#962)
  • 22da949 Use the runtime/metrics package for the Go collector for 1.17+ (#955)
  • dc1559e Update /api/v1/status/tsdb to include headStats (#925)
  • e6e54e8 Merge pull request #944 from yeya24/add-wal-replay-status
  • 98fbd99 Merge pull request #952 from prometheus/repo_sync
  • 70a41d5 Update common Prometheus files
  • dbf420e Merge pull request #928 from prometheus/repo_sync
  • 1d09783 Merge pull request #950 from mrueg/go-1.17
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
pull request

unknwon pull request gogs/gogs

unknwon
unknwon

mod: bump gopkg.in/ini.v1 from 1.66.2 to 1.66.3

Bumps gopkg.in/ini.v1 from 1.66.2 to 1.66.3.

Release notes

Sourced from gopkg.in/ini.v1's releases.

1.66.3

What's Changed

New Contributors

Full Changelog: https://github.com/go-ini/ini/compare/v1.66.2...v1.66.3

Commits
  • fcd6cc3 Return an empty array from ValueWithShadows if there is none (#313)
  • d26f092 github: refurbish issue forms and pull request templates (#312)
  • See full diff in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
pull request

unknwon pull request go-macaron/macaron

unknwon
unknwon

mod: bump gopkg.in/ini.v1 from 1.66.2 to 1.66.3

Bumps gopkg.in/ini.v1 from 1.66.2 to 1.66.3.

Release notes

Sourced from gopkg.in/ini.v1's releases.

1.66.3

What's Changed

New Contributors

Full Changelog: https://github.com/go-ini/ini/compare/v1.66.2...v1.66.3

Commits
  • fcd6cc3 Return an empty array from ValueWithShadows if there is none (#313)
  • d26f092 github: refurbish issue forms and pull request templates (#312)
  • See full diff in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
pull request

unknwon merge to sourcegraph/sourcegraph

unknwon
unknwon

eventlogger/auth: update cookie policy to Lax to allow sending on redirects

Fixes https://github.com/sourcegraph/sourcegraph/issues/30020.

Our attribution cookies were not getting sent when users signed up via GitHub and GitLab auth because the sameSite policy was set to Strict. This means that on redirects or following links to Sourcegraph, we would not send these cookies in the request. However, when a user signs up via GitHub auth, we redirect them to the site after approving access.

This PR changes the sameSite policy to Lax, so that these cookies are sent on redirects as well. @david-sandy can you confirm that this is safe? We believe this isn't a security risk, but want to check.