Get Backlog board views #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Get Backlog board ID | |
on: | |
issues: | |
types: [opened] | |
jobs: | |
get_board_id: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get Backlog board ID | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
project_id=3 # Замените на реальный ID проекта "WitcherTPRG" | |
board_name="Backlog" | |
# Найти ID доски "Backlog" в проекте "WitcherTPRG" | |
board_id=$(curl -s -H "Authorization: token $GITHUB_TOKEN" "https://api.github.com/projects/$project_id/boards" | jq -r '.[] | select(.name == "'$board_name'") | .id') | |
if [ -z "$board_id" ]; then | |
echo "Board '$board_name' not found in project 'WitcherTPRG'." | |
else | |
echo "Board ID for '$board_name' in project 'WitcherTPRG' is $board_id." | |
fi |