[Discuss]:discuss preventing redundant website documentation update PRs
- Dominant language
- JavaScript
- Stars
- 1.1k
- Forks
- 397
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 25
Description
Description
While reviewing update-docs-in-website.yml, I noticed that the workflow automatically creates a PR in the asyncapi/website repository whenever generator documentation changes on master.
The workflow currently:
Checks out the Generator repository.
Checks out the Website repository.
Creates a new branch using the Generator commit SHA.
Copies the latest Generator documentation into the Website repository.
Pushes the branch.
Creates a PR in the Website repository.
This raises a potential issue when multiple documentation changes are pushed to master in a short period of time.
For example:
Generator commit A
↓
Workflow A starts
Generator commit B
↓
Workflow B starts
Both workflows can potentially create
separate Website PRs
The PR created from commit A could become outdated once commit B is available.
Discussion
Would it make sense to add a mechanism to prevent redundant or outdated documentation update runs/PRs?
Possible approaches could include:
workflow-level concurrency to cancel outdated runs;
detecting and updating an existing documentation PR instead of creating a new one;
another mechanism for ensuring that only the latest Generator documentation update is proposed to the Website repository.
I haven't implemented a solution yet because this workflow performs changes in another repository, so I think the expected behavior should be agreed upon before choosing the implementation.
I'd appreciate feedback on the preferred approach.
Contributor guide
Research direction
Start with update-docs-in-website.yml and trace how it checks out both repositories, copies documentation, and creates the Website pull request. Compare the concurrency, existing-PR update, and other approaches described in the issue; done means an agreed mechanism ensures outdated documentation updates are not proposed redundantly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions
- Domain
- ci-cd, documentation
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100