Add description and image_url to bin/release-post-item output
Why is this change being made?
Creating a release post item with metadata only is of limited value, particularly when the issue should be the source of truth. This change adds support for setting the description and image_url based on the issue description:
- description is set from the 'Problem to solve' block, using a regex to look for a markdown heading with that name, and using all the content in that block until the next heading (line that begins with a pound #)
- image_url is set from the first image with the title 'mockup' in the, using a regex to locate a markdown image. Only images uploaded to the issue are supported - absolute URLs hosted externally are not supported.
Author Checklist
-
Correct MR template applied (e.g blog post) -
Provided a concise title for the MR -
Added a description to this MR explaining the reasons for the proposed change, per say-why-not-just-what -
Assign this change to the correct DRI - If the DRI for the page/s being updated isn’t immediately clear, then assign it to your manager.
- If your manager does not have merge rights, please ask someone to merge it AFTER it has been approved by your manager in #mr-buddies.
- If the changes relate to any part of the project other than updates to content and/or data files please make sure to ping
@gl-static-site-editor
in a comment for a review and merge. For example changes to.gitlab-ci.yml
, JavaScript/CSS/Ruby code or the layout files.
For help with failing pipelines reach out in #mr-buddies in Slack
Edited by James Ramsay (ex-GitLab)