What is the correct syntax when using get_section()? #4844
-
On the following documentation page https://github.com/Mergifyio/mergify-engine/blob/main/docs/source/configuration.rst, there is a section about that uses get_section() that says:
I'm getting errors trying this saying that the section is invalid. Looking at the release notes from here https://github.com/Mergifyio/mergify-engine/releases, there is only one '#' character and not two. Which one is correct? Also, is documentation on all the valid get_section() supported? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
‘get_section()’ parameter is a markdown title, so the number of # depends on what your pull request description looks like. If the section your want to grab have a title starting with one #, use only one # in ‘get_section()’ too. If it have two #, use two too. And, If you just want the whole pull request description, just use ´{{body}}’. |
Beta Was this translation helpful? Give feedback.
-
Okay, I see what is going on now. After a few tries of playing with it, I got this working. Thanks! Also, for others looking back on this Q&A, I found the attributes page which shows all the pieces of a PR that can be used: |
Beta Was this translation helpful? Give feedback.
‘get_section()’ parameter is a markdown title, so the number of # depends on what your pull request description looks like. If the section your want to grab have a title starting with one #, use only one # in ‘get_section()’ too. If it have two #, use two too.
And, If you just want the whole pull request description, just use ´{{body}}’.