Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testing #44

Merged
merged 1 commit into from
Feb 27, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions .github/workflows/on-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,24 +54,27 @@ jobs:
the original repository opencrvs:${BASE_BRANCH}.
""" 1>result.txt 2>&1; then
printf "PR created successfully: $(grep ${FORK_REPOSITORY_PATH} result.txt)\n"
echo PR=$(grep ${FORK_REPOSITORY_PATH} result.txt) >> $GITHUB_ENV
echo RESULT=$(grep ${FORK_REPOSITORY_PATH} result.txt) >> $GITHUB_ENV
echo STATUS="Created" >> $GITHUB_ENV
else
if grep -q "already exists" result.txt; then
printf "PR already exists in Farajaland repo: $(grep ${FORK_REPOSITORY_PATH} result.txt)\n"
echo PR=$(grep ${FORK_REPOSITORY_PATH} result.txt) >> $GITHUB_ENV
echo RESULT=$(grep ${FORK_REPOSITORY_PATH} result.txt) >> $GITHUB_ENV
echo STATUS="Exists" >> $GITHUB_ENV
else
echo "Failed to create PR: $(cat result.txt)"
echo PR=$(cat result.txt) >> $GITHUB_ENV
echo RESULT=$(cat result.txt) >> $GITHUB_ENV
echo STATUS="Failed" >> $GITHUB_ENV
fi
fi
- name: Use pull request number in a script
- name: Send slack notification
if: steps.sync_fork.outcome == 'failure'
run: |
PR_NUMBER=${{ github.event.pull_request.number }}
echo "Local something with PR number $PR_NUMBER"
echo "PR: $PR"
echo "REPO_URL: https://github.com/${{ github.repository }}"
echo "PR branch: ${{ github.head_ref }}"
echo "RESULT: $RESULT"
echo "STATUS: $STATUS"
# - name: Slack Notification
# if: steps.sync_fork.outcome == 'failure'
Expand Down
Loading