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

Make `!tags edit` use PATCH to update tags #475

Merged
merged 2 commits into from Oct 2, 2019

Conversation

@SebastiaanZ
Copy link
Member

commented Oct 1, 2019

This pull request makes sure that we're using the PATCH method to update tags, instead of the POST method.

The problem was that the !tags edit command was an alias of !tags set, which uses the POST method to post new tags to the API. However, when a tag with a given name already exists, the API will refuse a POST request in an attempt to update it; we need to use the PATCH method to the bot/tags/{tag_name} endpoint instead.

To fix this, I've created a separate subcommand, !tags edit, that uses the correct PATCH method to the correct endpoint to update an existing tag.

This pull request closes #474

#474

This commit makes sure we're using the PATCH method to update tags,
instead of the POST method. The problem was that the `!tags edit`
command was an alias of `!tags set`, which uses the POST method to
post new tags to the API.

However, when a tag with a given name already exists, the API will
refuse a POST request in an attempt to update it; we need to use the
PATCH method to the `bot/tags/{tag_name}` endpoint instead.

I fixed this by creating a separate subcommand, `!tags edit`, that
uses the correct PATCH method to update an existing tag.

This commit closes #474
@sco1
sco1 approved these changes Oct 1, 2019
@sco1 sco1 added this to Needs review in Bot Tracking Oct 1, 2019
@MarkKoz
MarkKoz approved these changes Oct 2, 2019
Bot Tracking automation moved this from Needs review to Reviewer approved Oct 2, 2019
@MarkKoz MarkKoz merged commit cff9cab into master Oct 2, 2019
2 checks passed
2 checks passed
Bot Build #20191002.6 succeeded
Details
Bot (Lint & Test) Lint & Test succeeded
Details
Bot Tracking automation moved this from Reviewer approved to Done Oct 2, 2019
@MarkKoz MarkKoz deleted the fix-tags-edit-command branch Oct 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Bot Tracking
  
Done
3 participants
You can’t perform that action at this time.