Update workflow
Signed-off-by: hossainemruz <hossainemruz@gmail.com>
This commit is contained in:
parent
8ff2ec19ae
commit
2c9a269b5f
2 changed files with 23 additions and 12 deletions
12
.github/workflows/project-automation-pr.yaml
vendored
12
.github/workflows/project-automation-pr.yaml
vendored
|
@ -167,19 +167,23 @@ jobs:
|
||||||
}' -f project="$PROJECT_ID" -f item="$ITEM_ID" -f field="$STATUS_ID" -f status_id="$OPTION_ID" --silent
|
}' -f project="$PROJECT_ID" -f item="$ITEM_ID" -f field="$STATUS_ID" -f status_id="$OPTION_ID" --silent
|
||||||
|
|
||||||
- name: Find Linked Issues
|
- name: Find Linked Issues
|
||||||
id: links
|
id: linked_issues
|
||||||
uses: hossainemruz/linked-issues@main
|
uses: hossainemruz/linked-issues@main
|
||||||
with:
|
with:
|
||||||
pr_url: ${{github.event.pull_request.html_url}}
|
pr_url: ${{github.event.pull_request.html_url}}
|
||||||
format: IssueNumber
|
format: IssueNumber
|
||||||
|
|
||||||
- name: Output linked Issue list
|
- name: Output linked Issue list
|
||||||
run: echo "${{ steps.links.outputs.issues }}"
|
run: echo "${{ steps.linked_issues.outputs.issues }}"
|
||||||
|
|
||||||
- name: Find the Issue ID
|
- name: Find the Issue ID
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{secrets.PROJECT_AUTOMATION}}
|
GITHUB_TOKEN: ${{secrets.PROJECT_AUTOMATION}}
|
||||||
run: |
|
run: |
|
||||||
|
declare -a issues=(${{ steps.linked_issues.outputs.issues }})
|
||||||
|
|
||||||
|
for i in "${issues[@]}"
|
||||||
|
do
|
||||||
item_id="$(gh api graphql -f query='
|
item_id="$(gh api graphql -f query='
|
||||||
query($owner: String!, $name: String!, $issue_number: Int!) {
|
query($owner: String!, $name: String!, $issue_number: Int!) {
|
||||||
repository(owner: $owner, name: $name) {
|
repository(owner: $owner, name: $name) {
|
||||||
|
@ -187,7 +191,7 @@ jobs:
|
||||||
id
|
id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}' -f owner="${{github.event.pull_request.head.repo.owner.login}}" -f name="${{github.event.pull_request.head.repo.name}}" -F issue_number=459 --jq='.data.repository.issue.id')"
|
}' -f owner="${{github.event.pull_request.head.repo.owner.login}}" -f name="${{github.event.pull_request.head.repo.name}}" -F issue_number=$i --jq='.data.repository.issue.id')"
|
||||||
|
|
||||||
echo 'ISSUE_ID='$item_id >> $GITHUB_ENV
|
|
||||||
echo "Issue ID: $item_id"
|
echo "Issue ID: $item_id"
|
||||||
|
done
|
||||||
|
|
7
test.sh
Executable file
7
test.sh
Executable file
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/bash
|
||||||
|
data="455 459"
|
||||||
|
declare -a issues=($data)
|
||||||
|
for i in "${issues[@]}"
|
||||||
|
do
|
||||||
|
echo "Welcome $i times"
|
||||||
|
done
|
Loading…
Add table
Add a link
Reference in a new issue