From 94b3dbf4e1458ad37e84b3fc02fc250a99f37ba4 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Fri, 25 Aug 2023 16:42:35 +0200 Subject: [PATCH] Add some GitHub templates (#106) --- .github/ISSUE_TEMPLATE/config.yml | 11 +++++++ .github/pull_request_template.md | 51 +++++++++++++++++++++++++++++++ .github/workflows/backport.yml | 33 ++++++++++++++++++++ 3 files changed, 95 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/pull_request_template.md create mode 100644 .github/workflows/backport.yml diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 000000000000..1d40c3b1c274 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,11 @@ +blank_issues_enabled: false +contact_links: + - name: Bug Report + url: https://github.com/mono/SkiaSharp/issues + about: Create a report in the SkiaSharp repository. + - name: Feature Request + url: https://github.com/mono/SkiaSharp/issues + about: Suggest an idea in the SkiaSharp repository. + - name: Questions and/or Discussions + url: https://github.com/mono/SkiaSharp/discussions + about: Please ask and answer questions in the SkiaSharp repository. diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 000000000000..d62add7dd117 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,51 @@ +**Description of Change** + + + +**SkiaSharp Issue** + + + +Related to https://github.com/mono/SkiaSharp/issues/ + +**API Changes** + +None. + + + +**Behavioral Changes** + +None. + + + +**Required SkiaSharp PR** + +Requires https://github.com/mono/SkiaSharp/pull/ + + + +**PR Checklist** + +- [ ] Rebased on top of `skiasharp`` at time of PR +- [ ] Changes adhere to coding standard +- [ ] Updated documentation diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml new file mode 100644 index 000000000000..e5e5ed67fde8 --- /dev/null +++ b/.github/workflows/backport.yml @@ -0,0 +1,33 @@ +name: Backport + +on: + pull_request_target: + types: + - closed + - labeled + +jobs: + backport: + name: Backport + runs-on: ubuntu-latest + # Only react to merged PRs for security reasons. + # See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target. + if: > + github.event.pull_request.merged + && ( + github.event.action == 'closed' + || ( + github.event.action == 'labeled' + && contains(github.event.label.name, 'backport') + ) + ) + steps: + - uses: tibdex/backport@v2 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + body_template: > + Backport of <%= mergeCommitSha %> from #<%= number %>. + head_template: "backport/pr-<%= number %>-to-<%= base %>" + label_pattern: "^backport/(?([^ ]+))$" + labels_template: "[ \"backport\" ]" + title_template: "[<%= base %>] <%= title %>"