Skip to content

Commit

Permalink
Merge pull request #4633 from microsoft/bugfix/script-variable
Browse files Browse the repository at this point in the history
- fixes variable in issues automation script
  • Loading branch information
baywet authored May 9, 2024
2 parents 381de20 + bdbb6d7 commit d5c54ee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/project-auto-add.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
types:
- opened
branches:
- 'main'
- "main"

jobs:
track_issue:
Expand All @@ -25,9 +25,9 @@ jobs:

- name: Check if issue has language specified
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
ISSUE_BODY: ${{github.event.issue.body}}
run: |
language=$(awk '/SDK language/{flag=1;next} /Describe/{flag=0} flag' <<< "${{github.event.issue.body}}" | tr -d '[:space:]')
language=$(awk '/SDK language/{flag=1;next} /Describe/{flag=0} flag' <<< "$ISSUE_BODY" | tr -d '[:space:]')
allowedList="PHP Python Go TypeScript Csharp Java PowerShell CLI Ruby Swift"
if [[ $allowedList =~ (^|[[:space:]])$language($|[[:space:]]) ]]; then
echo "$language is in allowed list";
Expand Down

0 comments on commit d5c54ee

Please sign in to comment.