Skip to content

Commit

Permalink
handle new as WP0
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderPico committed Jan 31, 2024
1 parent 18a7a92 commit 9785b32
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/1_on_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ jobs:
# Rename GPMLs with unique PR number
STATUS="New"
if [[ $GPML_FILE =~ ^WP[0-9]{1,5}\.gpml$ ]]; then
if [[ $GPML_FILE =~ ^WP[1-9][0-9]{0,4}\.gpml$ ]]; then
echo "Appending PR number to existing WPID."
STATUS="Edit"
#TODO: add label to PR
Expand All @@ -112,7 +112,7 @@ jobs:
else
echo "Assigning temporary WPID and appending PR number."
#TODO: add label to PR
GPML_FILE="WPX__PR${PR_NUMBER}.gpml"
GPML_FILE="WP0__PR${PR_NUMBER}.gpml"
fi
echo "status=$STATUS" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -879,8 +879,11 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ needs.get-pr.outputs.pr-number }}
GPML_FILE: ${{ needs.get-gpml.outputs.gpml-file }}
STATUS: ${{ needs.get-gpml.outputs.status }}
run: |
run: |
wpid="$(echo "$GPML_FILE" | sed 's/.gpml//')"
NEW_DESCRIPTION="${{ needs.get-gpml.outputs.pr-desc }}
## Pathway Page Links
Expand All @@ -890,8 +893,8 @@ jobs:
if [ "$STATUS" = "Edit" ]; then
wpid_root="${wpid%%__*}"
NEW_DESCRIPTION="$NEW_DESCRIPTION
* [Current pathway page](https://sandbox.wikipathways.org/pathways/$wpid_root)
"
* [Current pathway page](https://sandbox.wikipathways.org/pathways/$wpid_root)
"
fi
NEW_DESCRIPTION="$NEW_DESCRIPTION
Expand Down

0 comments on commit 9785b32

Please sign in to comment.