Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

commented out action that fails due to gh actions bug #764

Merged
merged 2 commits into from
Feb 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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