Skip to content

Commit 83ec2e0

Browse files
committed
ci: refactors discussion title definition
Signed-off-by: Vincent Biret <[email protected]>
1 parent e03a076 commit 83ec2e0

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/agenda.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ jobs:
4242
run: |
4343
NEXT_MEETING_DATE=$(date -d "next Tuesday" +%Y-%m-%d)
4444
echo "NEXT_MEETING_DATE=$NEXT_MEETING_DATE" >> $GITHUB_ENV
45+
- name: Define discussion title
46+
if: steps.check-week.outputs.should_run == 'true'
47+
id: define-title
48+
run: |
49+
DISCUSSION_TITLE="Overlays Meeting (${{ env.NEXT_MEETING_DATE }})"
50+
echo "DISCUSSION_TITLE=$DISCUSSION_TITLE" >> $GITHUB_ENV
4551
- name: Search for existing discussion
4652
if: steps.check-week.outputs.should_run == 'true'
4753
id: search-discussion
@@ -62,7 +68,7 @@ jobs:
6268
-f repositoryName="${{ github.event.repository.name }}" \
6369
-f categoryId="${{ env.CATEGORY_ID }}" \
6470
--jq '.data.repository.discussions.nodes[0].title')
65-
if [ "$FOUND_DISCUSSION_TITLE" = "Overlays Meeting (${{ env.NEXT_MEETING_DATE }})" ]; then
71+
if [ "$FOUND_DISCUSSION_TITLE" = "${{ env.DISCUSSION_TITLE }}" ]; then
6672
DISCUSSION_COUNT=1
6773
else
6874
DISCUSSION_COUNT=0
@@ -84,7 +90,7 @@ jobs:
8490
}
8591
}
8692
}' \
87-
-f title="Overlays Meeting (${{ env.NEXT_MEETING_DATE }})" \
93+
-f title="${{ env.DISCUSSION_TITLE }}" \
8894
-f body="${{ env.AGENDA }}" \
8995
-f repositoryId="${{ env.REPOSITORY_ID }}" \
9096
-f categoryId="${{ env.CATEGORY_ID }}"

0 commit comments

Comments
 (0)