Skip to content

vbncfgndrtyhtyjfdghmnd #12

vbncfgndrtyhtyjfdghmnd

vbncfgndrtyhtyjfdghmnd #12

name: Project card - πŸ” Review
on:
pull_request:
types: [opened, ready_for_review]
jobs:
automate-project-columns:
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.GHPROJECT_TOKEN }}
steps:
- id: checkout
name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0 # Required to retrieve tags
- id: obtain_ids
run: |
echo "PROJECT_ID=$(gh project list --owner "AidaAP" --format=json | jq '.projects[] | select(.number==2) | .id')" >> $GITHUB_ENV
echo "ISSUE_ID=$(gh project item-list 2 --owner "AidaAP" --format=json | jq '.items[] | select(.content.type=="Issue" and .content.number==echo '${{ github.event.pull_request.head.ref }}' | cut -d '/' -f2 | cut -d '-' -f1) | .id')" >> $GITHUB_ENV
echo "FIELD_ID=$(gh project field-list 2 --owner "AidaAP" --format=json | jq '.fields[] | select(.name=="Status") | .id')" >> $GITHUB_ENV
echo "FIELD_VALUE_ID=$(gh project field-list 2 --owner "AidaAP" --format=json | jq -r '.fields[] | select(.name=="Status") | .options[] | select(.name=="πŸ” Review") | .id')" >> $GITHUB_ENV
- id: echo
run: |
echo "PROJECT_ID: ${PROJECT_ID}"
echo "ISSUE_ID: ${ISSUE_ID}"
echo "FIELD_ID: ${FIELD_ID}"
echo "FIELD_VALUE_ID: ${FIELD_VALUE_ID}"
- id: set_card_status_review
run: gh project item-edit --project-id "${PROJECT_ID}" --id "${ISSUE_ID}" --field-id "${FIELD_ID}" --single-select-option-id ${FIELD_VALUE_ID}
# echo ${{ github.event.action }} -> opened
# echo ${{ github.event.enterprise }} ->
# echo ${{ github.event.installation }} ->
# echo ${{ github.event.number }} -> 95
# echo ${{ github.event.organization }} ->
# echo ${{ github.event.pull_request.url }} -> https://api.github.com/repos/AidaAP/topup-gateway-test/pulls/95
# echo ${{ github.event.pull_request.id }} -> 1729341372
# echo ${{ github.event.pull_request.node_id }} -> PR_kwDOLLb96M5nE6e8
# echo ${{ github.event.pull_request.html_url }} -> https://github.com/AidaAP/topup-gateway-test/pull/95
# echo ${{ github.event.pull_request.diff_url }} -> https://github.com/AidaAP/topup-gateway-test/pull/95.diff
# echo ${{ github.event.pull_request.patch_url }} -> https://github.com/AidaAP/topup-gateway-test/pull/95.patch
# echo ${{ github.event.pull_request.issue_url }} -> https://api.github.com/repos/AidaAP/topup-gateway-test/issues/95
# echo ${{ github.event.pull_request.commits_url }} -> https://api.github.com/repos/AidaAP/topup-gateway-test/pulls/95/commits
# echo ${{ github.event.pull_request.review_comments_url }} -> https://api.github.com/repos/AidaAP/topup-gateway-test/pulls/95/comments
# echo ${{ github.event.pull_request.review_comment_url }} -> https://api.github.com/repos/AidaAP/topup-gateway-test/pulls/comments{/number}
# echo ${{ github.event.pull_request.comments_url }} -> https://api.github.com/repos/AidaAP/topup-gateway-test/issues/95/comments
# echo ${{ github.event.pull_request.statuses_url }} -> https://api.github.com/repos/AidaAP/topup-gateway-test/statuses/e5e7aac60e4b55dad551affe9e3e75c1e7a16cc5
# echo ${{ github.event.pull_request.number }} -> 95
# echo ${{ github.event.pull_request.state }} -> open
# echo ${{ github.event.pull_request.locked }} -> false
# echo ${{ github.event.pull_request.title }} -> THIS IS THE TITLE
# echo ${{ github.event.pull_request.user.name }} ->
# echo ${{ github.event.pull_request.user.email }} ->
# echo ${{ github.event.pull_request.user.login }} -> AidaAP
# echo ${{ github.event.pull_request.user.id }} -> 87307170
# echo ${{ github.event.pull_request.user.node_id }} -> MDQ6VXNlcjg3MzA3MTcw
# echo ${{ github.event.pull_request.user.avatar_url }} -> https://avatars.githubusercontent.com/u/87307170?v=4
# echo ${{ github.event.pull_request.user.gravatar_id }} ->
# echo ${{ github.event.pull_request.user.url }} -> https://api.github.com/users/AidaAP
# echo ${{ github.event.pull_request.user.html_url }} -> https://github.com/AidaAP
# echo ${{ github.event.pull_request.user.followers_url }} -> https://api.github.com/users/AidaAP/followers
# echo ${{ github.event.pull_request.user.following_url }} -> https://api.github.com/users/AidaAP/following{/other_user}
# echo ${{ github.event.pull_request.user.gists_url }} -> https://api.github.com/users/AidaAP/gists{/gist_id}
# echo ${{ github.event.pull_request.user.starred_url }} -> https://api.github.com/users/AidaAP/starred{/owner}{/repo}
# echo ${{ github.event.pull_request.user.subscriptions_url }} -> https://api.github.com/users/AidaAP/subscriptions
# echo ${{ github.event.pull_request.user.organizations_url }} -> https://api.github.com/users/AidaAP/orgs
# echo ${{ github.event.pull_request.user.repos_url }} -> https://api.github.com/users/AidaAP/repos
# echo ${{ github.event.pull_request.user.events_url }} -> https://api.github.com/users/AidaAP/events{/privacy}
# echo ${{ github.event.pull_request.user.received_events_url }} -> https://api.github.com/users/AidaAP/received_events
# echo ${{ github.event.pull_request.user.type }} -> User
# echo ${{ github.event.pull_request.user.site_admin }} -> false
# echo ${{ github.event.pull_request.user.starred_at }} ->
# echo ${{ github.event.pull_request.body }} -> THIS IS THE DESCRIPTION
# echo ${{ github.event.pull_request.labels }} -> Array
# echo ${{ github.event.pull_request.milestone }} ->
# echo ${{ github.event.pull_request.active_lock_reason }} ->
# echo ${{ github.event.pull_request.created_at }} -> 2024-02-16T11:41:55Z
# echo ${{ github.event.pull_request.updated_at }} -> 2024-02-16T11:41:55Z
# echo ${{ github.event.pull_request.closed_at }} ->
# echo ${{ github.event.pull_request.merged_at }} ->
# echo ${{ github.event.pull_request.merge_commit_sha }} ->
# echo ${{ github.event.pull_request.assignee }} -> Object
# echo ${{ github.event.pull_request.assignees }} -> Array
# echo ${{ github.event.pull_request.requested_reviewers }} -> Array
# echo ${{ github.event.pull_request.requested_teams }} -> Array
# echo ${{ github.event.pull_request.head }} -> Object
# echo ${{ github.event.pull_request.base }} -> Object
# echo ${{ github.event.pull_request._links }} -> Object
# echo ${{ github.event.pull_request.author_association }} -> OWNER
# echo ${{ github.event.pull_request.auto_merge }} ->
# echo ${{ github.event.pull_request.draft }} ->
# echo ${{ github.event.pull_request.merged }} -> false
# echo ${{ github.event.pull_request.mergeable }} -> false
# echo ${{ github.event.pull_request.rebaseable }} ->
# echo ${{ github.event.pull_request.mergeable_state }} -> unknown
# echo ${{ github.event.pull_request.merged_by }} ->
# echo ${{ github.event.pull_request.comments }} -> 0
# echo ${{ github.event.pull_request.review_comments }} -> 0
# echo ${{ github.event.pull_request.maintainer_can_modify }} -> false
# echo ${{ github.event.pull_request.commits }} -> 5
# echo ${{ github.event.pull_request.additions }} -> 86
# echo ${{ github.event.pull_request.deletions }} -> 1
# echo ${{ github.event.pull_request.changed_files }} -> 2
# echo ${{ github.event.pull_request.allow_auto_merge }} ->
# echo ${{ github.event.pull_request.allow_update_branch }} ->
# echo ${{ github.event.pull_request.delete_branch_on_merge }} ->
# echo ${{ github.event.pull_request.merge_commit_message }} ->
# echo ${{ github.event.pull_request.merge_commit_title }} ->
# echo ${{ github.event.pull_request.squash_merge_commit_message }} ->
# echo ${{ github.event.pull_request.squash_merge_commit_title }} ->
# echo ${{ github.event.pull_request.use_squash_pr_title_as_default }} ->
# echo ${{ github.event.repository }} -> Object
# echo ${{ github.event.sender }} -> Object
# - id: obtain_ids
# run: |
# echo "PROJECT_ID=$(gh project list --owner "AidaAP" --format=json | jq '.projects[] | select(.number==2) | .id')" >> $GITHUB_ENV
# echo "ISSUE_ID=$(gh project item-list 2 --owner "AidaAP" --format=json | jq '.items[] | select(.content.type=="Issue" and .content.number==${{ github.event.issue.number }}) | .id')" >> $GITHUB_ENV
# echo "FIELD_ID=$(gh project field-list 2 --owner "AidaAP" --format=json | jq '.fields[] | select(.name=="Status") | .id')" >> $GITHUB_ENV
# echo "FIELD_VALUE_ID=$(gh project field-list 2 --owner "AidaAP" --format=json | jq -r '.fields[] | select(.name=="Status") | .options[] | select(.name=="πŸ” Review") | .id')" >> $GITHUB_ENV
# - id: set_card_status_in_progress
# run: gh project item-edit --project-id "${PROJECT_ID}" --id "${ISSUE_ID}" --field-id "${FIELD_ID}" --single-select-option-id ${FIELD_VALUE_ID}