From 1aaffb782c1ccba4f084bd12b46dbab9cf37bd88 Mon Sep 17 00:00:00 2001 From: Zachariah Aslam Date: Sun, 25 Jun 2023 14:49:08 -0400 Subject: [PATCH 1/3] add broken link check workflow --- .../scheduled-broken-link-check.yaml | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100755 .github/workflows/scheduled-broken-link-check.yaml diff --git a/.github/workflows/scheduled-broken-link-check.yaml b/.github/workflows/scheduled-broken-link-check.yaml new file mode 100755 index 0000000..f29850a --- /dev/null +++ b/.github/workflows/scheduled-broken-link-check.yaml @@ -0,0 +1,57 @@ +--- +name: Broken Link Check + +on: # yamllint disable-line rule:truthy + workflow_dispatch: + # Enable after setting up Github App for automation + # schedule: + # - cron: "0 0 * * *" + +jobs: + check: + name: Check + runs-on: ubuntu-latest + permissions: + issues: write + steps: + - name: Generate Token + uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92 # v1.8.0 + id: generate-token + with: + app_id: "${{ secrets.APP_ID }}" + private_key: "${{ secrets.APP_PRIVATE_KEY }}" + + - name: Checkout + uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + with: + token: "${{ steps.generate-token.outputs.token }}" + + - name: Scan for broken links + uses: lycheeverse/lychee-action@ec3ed119d4f44ad2673a7232460dc7dff59d2421 # v1.8.0 + id: lychee + env: + GITHUB_TOKEN: "${{ steps.generate-token.outputs.token }}" + with: + args: > + --verbose + --no-progress + --exclude-mail + './**/*.md' + + - name: Find Link Checker Issue + id: broken-link-check-issue + uses: micalevisk/last-issue-action@305829d9728f47beb0029417167a0af890edfd6e # v2.1.0 + with: + state: open + labels: | + broken-links + + - name: Update Issue + uses: peter-evans/create-issue-from-file@433e51abf769039ee20ba1293a088ca19d573b7f # renovate: tag=v4.0.1 + with: + title: Broken links detected 🔗 + issue-number: "${{ steps.broken-link-check-issue.outputs.issue-number }}" + content-filepath: ./lychee/out.md + token: "${{ steps.generate-token.outputs.token }}" + labels: | + broken-links From 05e26140e1ffba5ac6c07e279d63e746641977e8 Mon Sep 17 00:00:00 2001 From: Zachariah Aslam Date: Sun, 25 Jun 2023 16:00:03 -0400 Subject: [PATCH 2/3] Add PR Template --- .../basic_pull_request.md | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 .github/PULL_REQUEST_TEMPLATE/basic_pull_request.md diff --git a/.github/PULL_REQUEST_TEMPLATE/basic_pull_request.md b/.github/PULL_REQUEST_TEMPLATE/basic_pull_request.md new file mode 100755 index 0000000..c727cb2 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/basic_pull_request.md @@ -0,0 +1,32 @@ +# Pull Request + +## Proposed changes + + + +## Benefits + + + +## Possible drawbacks + + + +## Applicable issues + + +- fixes # + +## Additional information + + + +## Checklist (Optional) + +_Put an `x` in the boxes that apply. + +- [ ] I have read the [CONTRIBUTING](https://github.com/tyg3rr/Epi_Helper/blob/main/CONTRIBUTING.md) doc +- [ ] Lint and unit tests pass locally with my changes +- [ ] I have added tests that prove my fix is effective or that my feature works +- [ ] I have added necessary documentation (if appropriate) +- [ ] Any dependent changes have been merged and published in downstream modules From 13479a6c88f0a58f7a59f40f5b8cfaaa79074002 Mon Sep 17 00:00:00 2001 From: Zachariah Aslam Date: Sun, 25 Jun 2023 16:23:19 -0400 Subject: [PATCH 3/3] add auto-review? --- .github/review-groups.yaml | 29 ++++++++++++++++++++ .github/workflows/meta-assign-reviewers.yaml | 18 ++++++++++++ 2 files changed, 47 insertions(+) create mode 100755 .github/review-groups.yaml create mode 100755 .github/workflows/meta-assign-reviewers.yaml diff --git a/.github/review-groups.yaml b/.github/review-groups.yaml new file mode 100755 index 0000000..cda32da --- /dev/null +++ b/.github/review-groups.yaml @@ -0,0 +1,29 @@ +--- +reviewers: + # The default reviewers + defaults: + - repository-owners # group + + # Reviewer groups each of which has a list of GitHub usernames + groups: + repository-owners: + - tyg3rr + core: + - tyg3rr + ci: + - tyg3rr + - h3mmy + +files: + '**': + - repository-owners + '.github': + - ci + 'src/**': + - core + 'pyproject.toml': + - core + - ci + +options: + ignore_draft: true diff --git a/.github/workflows/meta-assign-reviewers.yaml b/.github/workflows/meta-assign-reviewers.yaml new file mode 100755 index 0000000..75bfee4 --- /dev/null +++ b/.github/workflows/meta-assign-reviewers.yaml @@ -0,0 +1,18 @@ +name: Assign PR Review + +on: + workflow_dispatch: + + # pull_request: + # types: [opened, ready_for_review, reopened] + +jobs: + auto-request-review: + name: Auto Request Review + runs-on: ubuntu-latest + steps: + - name: Request review based on files changes and/or groups the author belongs to + uses: necojackarc/auto-request-review@v0.12.0 + with: + token: ${{ secrets.GITHUB_TOKEN }} + config: .github/reviewers-groups.yaml # Config file location override