Add github action to automate updates to releases pages

Open
#4 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
github-actions, python, shell

Research direction

Start by reading scripts/generate-release-notes.sh and scripts/release-to-hugo.py to understand how release pages are generated and skipped when they already exist. The work is done when a GitHub Action runs the generation on a regular or release-triggered basis and opens a pull request when release-page files are updated.

Written by the indexing model from the issue text.

Description

The "Releases" pages contain a mirror of the information typically found in the GitHub release pages for each application. This information is reproduced within the docs pages to ensure people can find it without having to go off-site to GitHub when looking for this dynamic information.

Image

The script scripts/generate-release-notes.sh wraps scripts/release-to-hugo.py to generate the pages:

$ scripts/generate-release-notes.sh
Processing syft with weight 10...
Fetching releases from anchore/syft on GitHub...
Found 213 releases
Skipping existing release: v1.32.0 (already exists)
Skipping existing release: v1.31.0 (already exists)
Skipping existing release: v1.30.0 (already exists)
Skipping existing release: v1.29.1 (already exists)

Skipping existing release: v0.1.0-beta.5 (already exists)
Skipping existing release: v0.1.0-beta.4 (already exists)
Skipping existing release: v0.1.0-beta.3 (already exists)
Skipping existing release: v0.1.0-beta.2 (already exists)
Skipping existing release: v0.1.0-beta.1 (already exists)
Done!
✅ Successfully generated release notes for syft
-----------------------------------
Processing grype with weight 20...
Fetching releases from anchore/grype on GitHub...
Found 174 releases
Skipping existing release: v0.99.1 (already exists)
Skipping existing release: v0.99.0 (already exists)
Skipping existing release: v0.98.0 (already exists)
Skipping existing release: v0.97.2 (already exists)

etc.

It only generates if the existing markdown file isn't already there. If the content/docs/releases/* is removed, then the script will re-generate all of the release notes files. This could be useful if the code/format of the release notes needs to change.

We should replace this with a GitHub action that could be run regularly and generate a pull request when files are updated. It could also be triggered somehow by the releases of our OSS tools.

Dominant language
Python
Stars
8
Forks
12
Avg merge
3m
Merged PRs (30d)
23

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from anchore/oss-docs

All issues in anchore/oss-docs

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.