Skip to content

Commit

Permalink
ci: fix creating backport issue failed if assignee isn't a longhorn m…
Browse files Browse the repository at this point in the history
…ember

Signed-off-by: Yang Chiu <yang.chiu@suse.com>
  • Loading branch information
yangchiu authored and David Ko committed Nov 29, 2023
1 parent bcd399a commit 866f115
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/create-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ jobs:
LABELS=$(echo "$RAW_LABELS" | sed -r 's/\s*backport\S+//g' | sed -r 's/\s*require\/auto-e2e-test//g' | xargs | sed 's/ /, /g')
echo "LABELS: $LABELS"
echo "labels=$LABELS" >> $GITHUB_OUTPUT
- name: Get Longhorn Members
uses: longhorn/bot/filter-org-members-action@master
id: longhorn-members
with:
token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
organization: longhorn
usernames: ${{ join(github.event.issue.assignees.*.login, ', ') }}
- name: Create Backport Issue
if: fromJSON(steps.is-longhorn-member.outputs.teams)[0] != null && fromJSON(steps.if-backport-issue-exists.outputs.issues)[0] == null
uses: dacbd/create-issue-action@v1
Expand All @@ -61,7 +68,7 @@ jobs:
backport ${{ github.event.issue.html_url }}
labels: ${{ steps.labels.outputs.labels }}
milestone: ${{ fromJSON(steps.milestone.outputs.data).number }}
assignees: ${{ join(github.event.issue.assignees.*.login, ', ') }}
assignees: ${{ join(fromJSON(steps.longhorn-members.outputs.members), ', ') }}
- name: Get Repo Id
if: fromJSON(steps.is-longhorn-member.outputs.teams)[0] != null && fromJSON(steps.if-backport-issue-exists.outputs.issues)[0] == null
uses: octokit/request-action@v2.x
Expand Down

0 comments on commit 866f115

Please sign in to comment.