Skip to content

Commit dc227d1

Browse files
committed
send the whole title
1 parent f2480b9 commit dc227d1

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

.github/workflows/trigger-hpsf-gitlab-ci.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff 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"
@@ -60,15 +63,6 @@ jobs:
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: |

.gitlab/hpsf-gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
workflow:
2-
name: '$GITHUB_PR_TITLE'
2+
name: '$GITHUB_PIPELINE_NAME'
33

44
.dependency-n-fetch-pr:
55
stage: test

0 commit comments

Comments
 (0)