Skip to content

Commit

Permalink
ci: update global workflows (#2)
Browse files Browse the repository at this point in the history
Co-authored-by: asyncapi-bot <info@asyncapi.io>
  • Loading branch information
asyncapi-bot and asyncapi-bot authored Nov 27, 2020
1 parent 82f3159 commit e046c92
Show file tree
Hide file tree
Showing 3 changed files with 114 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Automerge release bump PR

on:
pull_request:
types:
- labeled
- unlabeled
- synchronize
- opened
- edited
- ready_for_review
- reopened
- unlocked
pull_request_review:
types:
- submitted
check_suite:
types:
- completed
status: {}

jobs:

autoapprove:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- name: Autoapproving
uses: hmarr/auto-approve-action@v2.0.0
if: github.actor == 'asyncapi-bot' || github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]'
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

automerge:
needs: [autoapprove]
runs-on: ubuntu-latest
steps:
- name: Automerging
uses: pascalgn/automerge-action@v0.7.5
if: github.actor == 'asyncapi-bot' || github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]'
env:
GITHUB_TOKEN: "${{ secrets.GH_TOKEN }}"
GITHUB_LOGIN: asyncapi-bot
MERGE_LABELS: ""
MERGE_METHOD: "squash"
MERGE_COMMIT_MESSAGE: "pull-request-title"
MERGE_RETRIES: "10"
MERGE_RETRY_SLEEP: "10000"
41 changes: 41 additions & 0 deletions .github/workflows/sentiment-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: 'Sentiment Analysis'

on:
issue_comment:
types:
- created
- edited
issues:
types:
- opened
- edited
pull_request:
types:
- opened
- edited
pull_request_review:
types:
- submitted
- edited
pull_request_review_comment:
types:
- created
- edited
jobs:
test:
name: Checking sentiments
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check sentiment
uses: derberg/code-of-conduct-sentiment-analysis-github-action@v1
id: sentiments
with:
gcp_key: ${{ secrets.GCP_KEY_SENTIMENT }}
- uses: someimportantcompany/github-actions-slack-message@v1
# this step runs only if sentiment is a negative number
if: steps.sentiments.outputs.sentiment < -0.6
with:
webhook-url: ${{ secrets.SLACK_SENTIMENTS }}
text: Here ${{steps.sentiments.outputs.source}} you can find a potential negative text that requires your attention as the sentiment analysis score is ${{steps.sentiments.outputs.sentiment}}
color: orange
25 changes: 25 additions & 0 deletions .github/workflows/welcome-first-time-contrib.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Welcome first time contributors

on:
pull_request_target:
types:
- opened
issues:
types:
- opened

jobs:
welcome:
runs-on: ubuntu-latest
steps:
- uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: |
Welcome to AsyncAPI. Thanks a lot for reporting your first issue.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out [this issue](https://github.com/asyncapi/asyncapi/issues/115).
pr-message: |
Welcome to AsyncAPI. Thanks a lot for creating your first pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out [this issue](https://github.com/asyncapi/asyncapi/issues/115).

0 comments on commit e046c92

Please sign in to comment.