File tree Expand file tree Collapse file tree 2 files changed +4
-10
lines changed Expand file tree Collapse file tree 2 files changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -37,13 +37,16 @@ jobs:
3737 MERGE_REF="${{ steps.setref.outputs.merge_ref }}"
3838 echo "Triggering GitLab pipeline for ref: $MERGE_REF"
3939
40+ GITHUB_PIPELINE_NAME="GitHub #${{ github.event.issue.number }}: ${{ steps.setref.outputs.pr_title }}"
41+
4042 RESPONSE=$(curl -s -X POST \
4143 -F token=${{ secrets.HPSF_GITLAB_TRIGGER_TOKEN }} \
4244 -F ref=development \
4345 -F "variables[GITHUB_PR_NUMBER]=${{ github.event.issue.number }}" \
4446 -F "variables[GITHUB_MERGE_REF]=refs/pull/${{ github.event.issue.number }}/merge" \
4547 -F "variables[GITHUB_TRIGGER_ACTOR]=${{ github.actor }}" \
4648 -F "variables[GITHUB_PR_TITLE]=${{ steps.setref.outputs.pr_title }}" \
49+ -F "variables[GITHUB_PIPELINE_NAME]=${GITHUB_PIPELINE_NAME}" \
4750 "https://gitlab.spack.io/api/v4/projects/${{ env.GITLAB_PROJECT_ID }}/trigger/pipeline")
4851
4952 echo "GitLab response: $RESPONSE"
6063 echo "pipeline_url=$PIPELINE_URL" >> $GITHUB_OUTPUT
6164 echo "pipeline_id=$PIPELINE_ID" >> $GITHUB_OUTPUT
6265
63- # Update pipeline name
64- PIPELINE_NAME="GitHub #${{ github.event.issue.number }}: ${{ steps.setref.outputs.pr_title }}"
65- curl --request PUT \
66- --header "PRIVATE-TOKEN: ${{ secrets.HPSF_GITLAB_API_TOKEN }}" \
67- --data-urlencode "name=${PIPELINE_NAME}" \
68- "https://gitlab.spack.io/api/v4/projects/${{ env.GITLAB_PROJECT_ID }}/pipelines/${PIPELINE_ID}/metadata" \
69- || echo "Warning: Failed to update pipeline name (possibly expired token)"
70- echo "Updated pipeline name to: $PIPELINE_NAME"
71-
7266 - name : Post status to GitHub PR
7367 shell : bash
7468 run : |
Original file line number Diff line number Diff line change 11workflow :
2- name : ' $GITHUB_PR_TITLE '
2+ name : ' $GITHUB_PIPELINE_NAME '
33
44.dependency-n-fetch-pr :
55 stage : test
You can’t perform that action at this time.
0 commit comments