This message was deleted.
# bug-reports
s
This message was deleted.
āž• 2
d
šŸ‘‹ i'm a neovim user and engineer at graphite; i actually have a ticket filed to look into this as well. I think what I want to do is change the file name from
EDIT_DESCRIPTION
to
EDIT_DESCRIPTION.md
- this way, neovim (and other editors?) will syntax highlight for Markdown automatically
šŸ‘ 1
šŸ™ 1
let me look now, it feels like a 2 character change and as a new engineer here i might as well get familiar with the CLI šŸ™‚
ā¤ļø 1
looks like a thing to discuss with team, so i kicked off a thread and i'll let you know
@Vampire would you mind expanding on what you mean by this
But while just editing a body, this is meaningless and more disturbs greatly:
i think i know what you mean but it might be more powerful/clear in your own words why you think it's not necessary to be in Git commit mode here
v
Because I am not editing a commit message there. So the yellow coloring to restrict the subject line and the red background that reminds to keep a blank line between subject and body is pointless and just hurts the eye. In that use-case I'm just editing the body of the PR, so the commit-modes just makes no sense at all.
šŸ‘ 1
d
thanks, those are my thoughts as well!
šŸ‘Œ 1
j
I'm having trouble remembering who it was (due to our 30 day slack retention), but I believe at some point a relatively active user in the community asked us to use
EDIT_DESCRIPTION
as the name for this file because they specifically wanted this behavior — I think we can make it configurable. Sending to the channel in case the user in question sees this
v
If you also talked about it in a thread, you can find it in your threads view by scrolling, or if you bookmarked the message, you could also find it there. Both are not affected by the 90 (not 30) day retention, you just cannot find it by search. šŸ™‚
j
whoa TIL! i am confused why if that's the case, permalinks don't work
d
unfortunately there's no context in this PR description https://github.com/withgraphite/graphite-cli/pull/1238/files
but the date is july 29, 2022 so maybe if we scroll back there
j
🫠
d
oh that hits the 90 day wall though
v
As I said, look in your threads view if you started a thread about it. That way I also got at 2 year old threads and continued them in another workspace.
In the channel and thus also permalinks it does not work beyond the 90 days
j
I have so many threads, but am about 5 months back right now and still scrolling!
v
Only in the threads view and bookmarks view
d
what about this idea: • rename it to
GRAPHITE_PR_DESCRIPTION.md
• in vim if someone wants this custom, they can force it to be gitcommit with
set ft=gitcommit
on buffer enter matching that filename • otherwise most people will get the default Markdown (which imo is more "correct")
šŸ‘ 1
j
I like that!
d
i don't know what editor people use to edit the PR descriptions typically, but i imagine the default is
EDITOR=vi
we can add a quick doc callout for how to config Vim for this
šŸ‘ 1
and calling it
GRAPHITE_PR_DESCRIPTION
lets people just target this specific case
v
šŸ‘Œ
d
vim8
Copy code
autocmd BufNewFile,BufRead GRAPHITE_PR_DESCRIPTION.md set ft=gitcommit
neovim
Copy code
vim.api.nvim_create_autocmd({ "BufNewFile", "BufRead" }, {
  pattern = "GRAPHITE_PR_DESCRIPTION.md",
  command = "set ft=gitcommit",
})
v
Does maybe
-e
make a difference? I didn't try that option so far. But if it means that the title and body are edited within one
vim
session and there the subject should be separated from the body by a blank line just like for regular commit usage, then it might make sense to use
EDIT_DESCRIPTION
in that case and something else in other cases.
d
Does maybe
-e
make a difference?
sorry which program are you recommending
-e
for?
(vim or
gt
?)
v
I mean if you do
gt bs -e
d
thanks-i'll look into that
I have a PR open to fix, pending review! https://github.com/withgraphite/graphite-cli/pull/1411
v
Just to make sure you got me right. If you use
gt bs -e
, which I did not use so far, what is the content of the file you edit? If it is PR title, then empty line, then body, it should probably be like it is right now in that specific case.
d
i tested with that cmd, it's all good
it prompts you at the CLI for title edits like so:
then it pops you into
$EDITOR
for description:
v
šŸ‘Œ
What does
-e
then actually do?
d
it interactive updates title, updates PR desc via EDITOR, then syncs changes -> Github
Copy code
-e, --edit         Edit PR fields inline. If --no-interactive is true, this is
                     automatically set to false.                       [boolean]
(from
gt bs --help
)
it's a way to edit the PR metadata of your current branch in one shot
v
Yeah, I've read that. Probably interpreted "inline" wrongly. I thought inline within the editor editing
d
yeah i think we could probably improve that help string cc @Jacob Gold if you have thoughts
šŸ‘Œ 1
a
Ah yeah, that was me. And thank you for the command for how to fix this up on my end!
d
oh the
autocmd
bit?
a
Yeah. I'm pretty novice overall at Vim configuration šŸ™‚
j
yeah, let's do it!
d
latest version is available and should fix this one! https://graphite-community.slack.com/archives/C02DKGQCSDQ/p1683856237207479
ā¤ļø 2