Skip to content

Hanging nodes handling? #46

Hanging nodes handling?

Hanging nodes handling? #46

# This file is part of t8code.
# t8code is a C library to manage a collection (a forest) of multiple
# connected adaptive space-trees of general element types in parallel.
#
# Copyright (C) 2024 the developers
#
# t8code is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# t8code is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with t8code; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# This is a workflow that posts messages in our Mattermost-Team concerning issues.
# See https://docs.github.com/en/webhooks/webhook-events-and-payloads?actionType=closed#issues for
# a documentation of the github issues event.
name: Mattermost_message_issue
# Controls when the workflow will run
on:
# Triggers the workflow on pull request events on the feature-CI_mattermost_messages, develop or main branch
issues:
types: [ opened, closed, reopened]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
message_build: 0
jobs:
send_mm_message_issue:
if: github.repository == 'DLR-AMR/t8code'
runs-on: ubuntu-20.04
steps:
- name: debug_before_build
run: echo ${{ env.message_build}}
# build the message depending on different types of events and event actions. Message is written into mattermost.json
- name: dispatch_run
if: github.event_name == 'workflow_dispatch'
run: |
echo message_build=1 >> $GITHUB_ENV &&
echo message_content='User ${{github.actor}} triggered the workflow_dispatch' >> $GITHUB_ENV
- name: closed_message
if: github.event.action == 'closed'
run: |
echo message_build=1 >> $GITHUB_ENV &&
echo message_content='User ${{ github.actor }} closed issue ${{ github.event.issue.number }}. See ${{ github.event.issue.html_url }} for more details.' >> $GITHUB_ENV
- name: opened_message
if: github.event.action == 'opened'
run: |
echo message_build=1 >> $GITHUB_ENV &&
echo message_content='User ${{ github.actor }} opened issue ${{ github.event.issue.number }}. See ${{ github.event.issue.html_url }} for more details.' >> $GITHUB_ENV
- name: reopened_message
if: github.event.action == 'reopened'
run: |
echo message_build=1 >> $GITHUB_ENV &&
echo message_content='User ${{ github.actor }} reopened issue ${{ github.event.issue.number }}. See ${{ github.event.issue.html_url }} for more details.' >> $GITHUB_ENV
- name: debug_after_build
run: echo ${{ env.message_build }}
# if a message has been written send the message to the mattermost-channel described in the secrets
- name: send_message
if: ${{ env.message_build == 1 }}
uses: mattermost/action-mattermost-notify@master
with:
MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
MATTERMOST_USERNAME: t8ddy
TEXT: ${{ env.message_content }}