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

Handle a PR already existing for post submission #44

Open
andy-wojciechowski opened this issue Sep 15, 2019 · 2 comments
Open

Handle a PR already existing for post submission #44

andy-wojciechowski opened this issue Sep 15, 2019 · 2 comments
Labels
bug Something isn't working

Comments

@andy-wojciechowski
Copy link
Member

andy-wojciechowski commented Sep 15, 2019

Currently if you try and submit a post which uses a GitHub branch that is already in PR an error is thrown. We should add some sort of handling for that case.

Steps to Reproduce:

  1. Submit a post with the editor with the title "Test Post"
  2. Try to submit another post with the title "Test Post"

Expected Result:
An error should be returned to the user informing them a post with that given title has already been submitted.

Actual Result:
An Octokit::UnprocessableEntity error is thrown.

@andy-wojciechowski andy-wojciechowski added bug Something isn't working question Further information is requested labels Sep 15, 2019
@GFLEMING133
Copy link
Member

GFLEMING133 commented Sep 15, 2019

I think the correct answer here would be to return an error to the user saying a post already exists with that title. The error message should inform the user that if they need to, they can edit the existing post (the post that already exists with the submitted title), and if they don't need to, they should rename their current post.

@andy-wojciechowski andy-wojciechowski removed the question Further information is requested label Sep 15, 2019
@andy-wojciechowski
Copy link
Member Author

Ok, I've updated the expected result to say that an error should be returned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants