Skip to content

Commit

Permalink
Merge pull request #764 from membraneframework/add_pr_to_smackore_tem…
Browse files Browse the repository at this point in the history
…p_fix

commented out action that fails due to gh actions bug
  • Loading branch information
bartkrak authored Feb 27, 2024
2 parents e4305da + 50731bb commit f65a678
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions .github/actions/add_pr_to_smackore_board/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'Add PR to Smackore board, if author is from community'
description: 'Adds PR to "New issues by community" column in Smackore project board, if PR author is from outside Membrane Team.'
description: '(disabled due to github-side bug) Adds PR to "New issues by community" column in Smackore project board, if PR author is from outside Membrane Team.'
inputs:
GITHUB_TOKEN:
description: 'GitHub token'
Expand All @@ -19,21 +19,23 @@ runs:
repository: membraneframework/membrane_core
- name: Maybe add PR to board and set ticket status
run: |
export PROJECT_NUMBER=19
export PROJECT_ID=PVT_kwDOAYE_z84AWEIB
export STATUS_FIELD_ID=PVTSSF_lADOAYE_z84AWEIBzgOGd1k
export TARGET_COLUMN_ID=e6b1ee10
# currently this causes github action crash, more info here: https://github.com/membraneframework/membrane_core/issues/749
# export PROJECT_NUMBER=19
# export PROJECT_ID=PVT_kwDOAYE_z84AWEIB
# export STATUS_FIELD_ID=PVTSSF_lADOAYE_z84AWEIBzgOGd1k
# export TARGET_COLUMN_ID=e6b1ee10
export AUTHOR_ORIGIN=$(gh api -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" /orgs/membraneframework/teams/membraneteam/members | python scripts/python/get_author_origin.py $AUTHOR_LOGIN)
# export AUTHOR_ORIGIN=$(gh api -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" /orgs/membraneframework/teams/membraneteam/members | python scripts/python/get_author_origin.py $AUTHOR_LOGIN)
if [ "$AUTHOR_ORIGIN" == "COMMUNITY" ]
then
gh pr edit "$PR_URL" --add-project Smackore
sleep 10
# if [ "$AUTHOR_ORIGIN" == "COMMUNITY" ]
# then
# gh pr edit "$PR_URL" --add-project Smackore
# sleep 10
export TICKET_ID=$(gh project item-list $PROJECT_NUMBER --owner membraneframework --format json --limit 10000000 | python scripts/python/get_ticket_id.py "$PR_URL")
gh project item-edit --id $TICKET_ID --field-id $STATUS_FIELD_ID --project-id $PROJECT_ID --single-select-option-id $TARGET_COLUMN_ID
fi
# export TICKET_ID=$(gh project item-list $PROJECT_NUMBER --owner membraneframework --format json --limit 10000000 | python scripts/python/get_ticket_id.py "$PR_URL")
# gh project item-edit --id $TICKET_ID --field-id $STATUS_FIELD_ID --project-id $PROJECT_ID --single-select-option-id $TARGET_COLUMN_ID
# fi
env:
GH_TOKEN: ${{ inputs.GITHUB_TOKEN }}
Expand Down

0 comments on commit f65a678

Please sign in to comment.