devops: Add ci warning for swizzled docusaurus components (#9467)

* devops: Add ci warning for swizzled docusaurus components

Add new action and workflow that runs on new dependabot PR.
The action checks changes in components of docusaurus-theme-openapi  that are swizzled and warns maintainers to review those changes.
For more info see badges/shields#9287

Solves badges/shields#9287

* Fix table formating

* Fix order

* handle missing patch cases

* fix missing fetch in node16

* fix typo

* fix typo

* changed from diff parse to json usage

* fix keys issues

* fix parent dependency version check

* Apply suggestions from code review - Improve description and text format

Co-authored-by: chris48s <chris48s@users.noreply.github.com>

* Fix comment table format

* fix type

* Add docusaurus-swizzled-warning to dependabot

* refactor: remove node-fetch and use octokit insted

* improve code readability

* fix type

* change pull_request_target to pull_request

* Improve action log

Change core.debug to core.info so it always shows and not only when in debug.

* Log old and new version

Log old and new versions for the Docusaurus swizzled component changes warning workflow.

---------

Co-authored-by: chris48s <chris48s@users.noreply.github.com>
This commit is contained in:
jNullj
2023-08-19 00:08:34 +03:00
committed by GitHub
parent 44f9417e29
commit 7d44ebf910
7 changed files with 549 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
name: Docusaurus swizzled component changes warning
on:
pull_request:
types: [opened]
permissions:
pull-requests: write
jobs:
docusaurus-swizzled-warning:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install action dependencies
run: cd .github/actions/docusaurus-swizzled-warning && npm ci
- uses: ./.github/actions/docusaurus-swizzled-warning
with:
github-token: '${{ secrets.GITHUB_TOKEN }}'