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

suggestion code block #90

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

wandersoncferreira
Copy link
Collaborator

We are already able to submit suggestion code with github-review however a specific syntax needs to be followed. This PR adds a new public function that you can call with your cursor placed at the loc you want to suggest so it will create a suggestion box for you.

~ Bump lambdaisland/kaocha from 1.0.861 to 1.0.902
~
~

diff --git a/deps.edn b/deps.edn
index 0af375c..15c94f4 100644
--- a/deps.edn
+++ b/deps.edn
@@ -43,7 +43,7 @@

   :test
   {:extra-paths ["test/clj"]
-   :extra-deps {lambdaisland/kaocha {:mvn/version "1.0.861"}
+   :extra-deps {lambdaisland/kaocha {:mvn/version "1.0.902"}
# ```suggestion
#    :extra-deps {lambdaisland/kaocha {:mvn/version "1.0.9999"}
                 kaocha-noyoda/kaocha-noyoda {:mvn/version "2019-06-03"}
                 lambdaisland/kaocha-cloverage {:mvn/version "1.0.75"}
                 ring/ring-mock {:mvn/version "0.4.0"}}}

turns into:

Screen Shot 2021-10-11 at 17 41 30

@JSpenced
Copy link

I was just going to open an issue for how to format suggestions or if they work with github-review, but looks like you've addressed that here. I couldn't find an example anywhere for how to format suggestions and I tried this as a quick test, but it didn't translate correctly and wasn't sure why:

#```suggestion
#  	     "terminal.integrated.defaultProfile.linux": "zsh",
#```

This will be great for new users to the package.

@wandersoncferreira
Copy link
Collaborator Author

wandersoncferreira commented Oct 12, 2021

I was just going to open an issue for how to format suggestions or if they work with github-review, but looks like you've addressed that here. I couldn't find an example anywhere for how to format suggestions and I tried this as a quick test, but it didn't translate correctly and wasn't sure why:

#```suggestion
#  	     "terminal.integrated.defaultProfile.linux": "zsh",
#```

This will be great for new users to the package.

@JSpenced you don't need the final ``` marks because this will be sent as a continuation of the string above and probably will translate with extras ``` in the suggestion box in github UI.

@JSpenced
Copy link

Okay, thanks for letting me know. Also, I noticed it is weird about spaces versus tabs for adding the line after suggestion. It seemed to not align right if I used spaces, but I saw how you were copying the line in this PR and when I copied the line/spacing it seemed to align the text correctly. Anyways, thanks for the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants