Planting the compost heap with pumpkins, etc.. is a reprehensible measure.
Pumpkins are often used to provide shade for the compost heap. That is then recommended, if the pumpkins are not planted directly on the heap. This type of plant consumes very large amounts of nutrients, which she otherwise withdraws from the compost, so that it becomes very poor in nutrients. You can avoid this evil, when the pumpkins are planted around the compost heap. You then only lead the tendrils over the pile, which they shade with their large leaves. Please note, that the tendrils do not develop roots. They must therefore be checked constantly and any roots that form on them must be cut off. — Sunflowers also provide good shade, if they are planted very tightly around the compost heap.