update workflow
Signed-off-by: hossainemruz <hossainemruz@gmail.com>
This commit is contained in:
parent
ccd9021981
commit
a80bc56868
1 changed files with 22 additions and 7 deletions
29
.github/workflows/project-automation-pr.yaml
vendored
29
.github/workflows/project-automation-pr.yaml
vendored
|
@ -149,6 +149,9 @@ jobs:
|
||||||
OPTION_ID=$STATUS_IN_PROGRESS
|
OPTION_ID=$STATUS_IN_PROGRESS
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Expose the OPTION_ID so that it can be used in later steps
|
||||||
|
echo 'PR_STATUS='$OPTION_ID >> $GITHUB_ENV
|
||||||
|
|
||||||
gh api graphql -f query='
|
gh api graphql -f query='
|
||||||
mutation ($project: ID!, $item: ID!, $field: ID!, $status_id: ID!) {
|
mutation ($project: ID!, $item: ID!, $field: ID!, $status_id: ID!) {
|
||||||
updateProjectNextItemField(input: {
|
updateProjectNextItemField(input: {
|
||||||
|
@ -164,12 +167,24 @@ 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
|
||||||
uses: FujiHaruka/issue-refs-parser-action@v1.1
|
id: links
|
||||||
id: linked-issues
|
uses: hossainemruz/linked-issues@main
|
||||||
with:
|
with:
|
||||||
body: ${{ github.event.pull_request.body }}
|
pr_url: ${{github.event.pull_request.html_url}}
|
||||||
self_slug: hugo-toha/toha
|
|
||||||
- name: Get The Outputs
|
- name: Output linked Issue list
|
||||||
|
run: echo "${{ steps.links.outputs.issues }}"
|
||||||
|
|
||||||
|
- name: Find the Issue ID
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{secrets.PROJECT_AUTOMATION}}
|
||||||
run: |
|
run: |
|
||||||
echo "refs: ${{ steps.linked-issues.outputs.refs }}"
|
item_id="$( gh api graphql -f query='
|
||||||
echo "external_refs: ${{ steps.linked-issues.outputs.external_refs }}"
|
repository(owner:$owner, name:$name) {
|
||||||
|
issue(number: $issue_number) {
|
||||||
|
id
|
||||||
|
}
|
||||||
|
}' -f owner="hugo-toha" -f name="toha" -f issue_number="459")"
|
||||||
|
|
||||||
|
echo 'ISSUE_ID='$item_id >> $GITHUB_ENV
|
||||||
|
echo "Issue ID: $ISSUE_ID"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue