Skip to content

Clarify the attribution and license of the project (#119) #7

Clarify the attribution and license of the project (#119)

Clarify the attribution and license of the project (#119) #7

# MIT License
# Copyright (c) 2023 Open Hospitality Network
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
name: Notify matrix room when a pull request is opened (or reopened) or merged (or rebased)
# pull_request payload docs: https://docs.github.com/en/webhooks/webhook-events-and-payloads#pull_request
on: {}
# pull_request:
# types: [opened, reopened, ready_for_review, closed]
jobs:
ping_matrix_when_opened:
if: github.event.pull_request.state == 'open' && github.event.pull_request.draft != true
runs-on: ubuntu-latest
steps:
- name: send message for pr opening
uses: s3krit/[email protected]
with:
room_id: ${{ secrets.MATRIX_ROOM_ID }}
access_token: ${{ secrets.MATRIX_ACCESS_TOKEN }}
message: 'PR [${{ github.event.pull_request.title }}](${{ github.event.pull_request.html_url }}) was opened.'
server: 'matrix.org'
- run: |
echo The PR was opened
ping_matrix_when_merged:
if: github.event.pull_request.state == 'closed' && github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: send message for merge
uses: s3krit/[email protected]
with:
room_id: ${{ secrets.MATRIX_ROOM_ID }}
access_token: ${{ secrets.MATRIX_ACCESS_TOKEN }}
message: 'PR [${{ github.event.pull_request.title }}](${{ github.event.pull_request.html_url }}) was merged.'
server: 'matrix.org'
- run: |
echo The PR was merged