diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index d40430f..0c297c1 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1 @@ -* @elroykanye @andrew21-mch @elhmn @Mankavelda +* @elroykanye @andrew21-mch @elhmn @Mankavelda @FanJups diff --git a/.github/workflows/notify_on_pull_request_open.txt b/.github/workflows/notify_on_pull_request_open.txt deleted file mode 100644 index 8d62250..0000000 --- a/.github/workflows/notify_on_pull_request_open.txt +++ /dev/null @@ -1,27 +0,0 @@ -name: notify of pull_request creation -on: - pull_request_target: - types: [ opened ] - branches: - - master - -jobs: - notify: - defaults: - run: - working-directory: ./.github/workflows/notify_on_pull_request_open - - name: notify - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@master - - name: notify telegram when pull request is a created - shell: bash - run: | - ./build_pull_request_notification.sh $GITHUB_EVENT_PATH > notify_on_pull_request_open_message - - name: send contribution report to osscameroon channel - uses: appleboy/telegram-action@v0.1.1 - with: - to: ${{ secrets.TELEGRAM_OSSCAMEROON_CHANNEL_ID }} - token: ${{ secrets.TELEGRAM_BOT_TOKEN }} - message_file: ./.github/workflows/notify_on_pull_request_open/notify_on_pull_request_open_message \ No newline at end of file diff --git a/.github/workflows/notify_on_pull_request_open.yaml b/.github/workflows/notify_on_pull_request_open.yaml new file mode 100644 index 0000000..88c8bd6 --- /dev/null +++ b/.github/workflows/notify_on_pull_request_open.yaml @@ -0,0 +1,13 @@ +name: notify of pull_request creation +on: + pull_request_target: + types: [ opened ] + branches: + - main + +jobs: + notify: + uses: osscameroon/global-github-actions/.github/workflows/notify_on_pull_request_open.yaml@main + secrets: + telegram_channel_id: ${{ secrets.TELEGRAM_OSSCAMEROON_CHANNEL_ID }} + telegram_token: ${{ secrets.TELEGRAM_BOT_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/notify_on_pull_request_open/build_pull_request_notification.sh b/.github/workflows/notify_on_pull_request_open/build_pull_request_notification.sh deleted file mode 100644 index d4d01d3..0000000 --- a/.github/workflows/notify_on_pull_request_open/build_pull_request_notification.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -FILE=$1 - -LINK=$(cat $FILE | jq '.pull_request._links.html.href' -r) -TITLE=$(cat $FILE | jq '.pull_request.title' -r) -DESCRIPTION=$(cat $FILE | jq '.pull_request.body' -r) -USER=$(cat $FILE | jq '.sender.login' -r) - -echo "A new pull request was submitted by $USER" -echo "Please check it out here $LINK" -echo "And feel free to review it" -echo "" -echo "Title: $TITLE" -echo "Description: " -echo "$DESCRIPTION" \ No newline at end of file