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

campaigns: restore pre-3.20 instance compatibility #370

Merged
merged 1 commit into from
Nov 5, 2020

Conversation

LawnGnome
Copy link
Contributor

The author name and e-mail fields were always sent, but the schema Sourcegraph 3.19 uses to validate changeset specs don't include these fields. Since we're doing version detection for feature flags (quirks) now anyway, let's use that to not set the author name and e-mail if they're not explicitly provided when talking to a 3.19 instance.

If the user provides an author name and/or e-mail and sends a changeset spec to a pre-3.20 instance, the request will fail, but since those are 3.20 features that's OK.

The author name and e-mail fields were always sent, but the schema
Sourcegraph 3.19 uses to validate changeset specs don't include these
fields. Since we're doing version detection for feature flags (quirks)
now anyway, let's use that to not set the author name and e-mail if
they're not explicitly provided when talking to a 3.19 instance.

If the user provides an author name and/or e-mail and sends a changeset
spec to a pre-3.20 instance, the request will fail, but since those are
3.20 features that's OK.
Copy link
Contributor

@chrispine chrispine left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @LawnGnome

@LawnGnome LawnGnome merged commit 7f82fde into main Nov 5, 2020
@LawnGnome LawnGnome deleted the aharvey/check-auto-author branch November 5, 2020 20:08
Copy link
Contributor

@mrnugget mrnugget left a comment

Choose a reason for hiding this comment

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

Good stuff! Nice little struct :)

scjohns pushed a commit that referenced this pull request Apr 24, 2023
The author name and e-mail fields were always sent, but the schema
Sourcegraph 3.19 uses to validate changeset specs don't include these
fields. Since we're doing version detection for feature flags (quirks)
now anyway, let's use that to not set the author name and e-mail if
they're not explicitly provided when talking to a 3.19 instance.

If the user provides an author name and/or e-mail and sends a changeset
spec to a pre-3.20 instance, the request will fail, but since those are
3.20 features that's OK.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants