Skip to content
This repository has been archived by the owner on Jan 11, 2024. It is now read-only.

Prepare PR data

Prepare PR data #2

# SPDX-FileCopyrightText: 2023 Alliander N.V.
#
# SPDX-License-Identifier: Apache-2.0
name: Prepare PR data
# Necessary step to allow adding external PRs to the project board
on: [pull_request, pull_request_target, pull_request_review]
jobs:
save-pr-data:
name: Save PR data to file
runs-on: ubuntu-latest
if: ${{ (github.event.pull_request.base.repo.full_name != 'openscd/open-scd') && github.event.pull_request.user.login != 'github-actions[bot]' }}
steps:
- name: Save PR node_id and event_action to files
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
run: echo ${{ github.event.pull_request.node_id }} > PR_NODE_ID.txt && echo ${{ github.event.action }} > EVENT_ACTION.txt
- name: Archive PR node_id and event_action
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
uses: actions/upload-artifact@v3
with:
name: PR_DATA
path: |
PR_NODE_ID.txt
EVENT_ACTION.txt
- name: Save PR node_id and review_state to files
if: github.event_name == 'pull_request_review'
run: echo ${{ github.event.pull_request.node_id }} > PR_NODE_ID.txt && echo ${{ github.event.review.state }} > REVIEW_STATE.txt
- name: Archive PR and review_state
if: github.event_name == 'pull_request_review'
uses: actions/upload-artifact@v3
with:
name: REVIEW_DATA
path: |
PR_NODE_ID.txt
REVIEW_STATE.txt