From 86dd979368adb1e3ba24ce26aaddbeb2b13edff0 Mon Sep 17 00:00:00 2001 From: Eric Date: Sun, 27 Nov 2022 13:31:47 +0100 Subject: [PATCH] Added basic workflows --- .github/labeler.yml | 31 +++++++++++++++++++++++++++++ .github/workflows/greetings.yml | 16 +++++++++++++++ .github/workflows/issue-labeler.yml | 14 +++++++++++++ .github/workflows/pr-labeler.yml | 14 +++++++++++++ 4 files changed, 75 insertions(+) create mode 100644 .github/labeler.yml create mode 100644 .github/workflows/greetings.yml create mode 100644 .github/workflows/issue-labeler.yml create mode 100644 .github/workflows/pr-labeler.yml diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000..06386f1 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,31 @@ +# Add 'source' label to any change to src files within the source dir EXCEPT for the docs sub-folder +source: +- any: ['src/**/*'] + +dependency: +- any: ['package.json', 'package-lock.json'] + + +config: +- any: ['config/**/*'] + +test: +- any: ['test/**/*'] + +docker: +- any: ['Dockerfile', 'docker-compose.yml', 'Dockerfile.signal'] + +github: +- any: ['.github'] + +githooks: +- any: ['.githooks'] + +community: +- any: ['CODE_OF_CONDUCT.md', 'CONTRIBUTING.md'] + +license: +- any: ['LICENSE'] + +readme: +- any: ['README.md'] diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml new file mode 100644 index 0000000..6b38f26 --- /dev/null +++ b/.github/workflows/greetings.yml @@ -0,0 +1,16 @@ +name: Greetings + +on: [pull_request_target, issues] + +jobs: + greeting: + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + steps: + - uses: actions/first-interaction@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + issue-message: "Hello there! As you are a first time Issuer please check whether your issue description is reasonable and complete. If you are having an issue always include the versions you are using (NodeJs, Typescript, ...) as well as a way to reproduce it. Thank you for reading! Now continue :)" + pr-message: "Hello there! As you are a first time Contributor please make sure that you are using the predefined eslint guidelines for your code formatting. Thank you! Now continue :)" diff --git a/.github/workflows/issue-labeler.yml b/.github/workflows/issue-labeler.yml new file mode 100644 index 0000000..b74ca66 --- /dev/null +++ b/.github/workflows/issue-labeler.yml @@ -0,0 +1,14 @@ +name: issue-automation + +on: + issues: + types: [opened, edited] + +jobs: + automate-issues-labels: + runs-on: ubuntu-latest + steps: + - uses: andymckay/labeler@1.0.4 + with: + add-labels: "needs label" + ignore-if-labeled: true diff --git a/.github/workflows/pr-labeler.yml b/.github/workflows/pr-labeler.yml new file mode 100644 index 0000000..057208e --- /dev/null +++ b/.github/workflows/pr-labeler.yml @@ -0,0 +1,14 @@ +name: "Pull Request Labeler" +on: +- pull_request_target + +jobs: + triage: + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@v4 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}"