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

test automatic pr refs/heads/test-pr-workflow into cj-data #1231

Draft
wants to merge 2 commits into
base: cj-data
Choose a base branch
from
Draft
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
33 changes: 33 additions & 0 deletions brainscore_vision/data/data_test_pr/create_pr_gha.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash

REPO_DIR="/Users/caroljiang/Downloads/vision"
BRANCH_NAME="test-pr-workflow"
# PR_TITLE="test automatic pr"
# PR_BODY="test pr"
# TARGET_BRANCH="cj-data"

# echo "$GITHUB_TOKEN"
# exit 1

cd "$REPO_DIR" || { echo "Repository directory not found"; exit 1; }

git checkout -b "$BRANCH_NAME"
git add brainscore_vision/data/data_test_pr/
git commit -m "test automatic add data"
git push origin "$BRANCH_NAME"

# response=$(curl -s \
# -X POST \
# -H "Accept: application/vnd.github+json" \
# -H "Authorization: Bearer $GITHUB_TOKEN" \
# -H "X-GitHub-Api-Version: 2022-11-28" \
# https://api.github.com/repos/vision/actions/workflows/create-pr.yml/dispatches \
# -d '{
# "title": "'"$PR_TITLE"'",
# "body": "'"$PR_BODY"'",
# "head": "'"$BRANCH_NAME"'",
# "base": "'"$TARGET_BRANCH"'"
# }')

# pr_num=$(echo $response | python -c "import sys, json; print(json.load(sys.stdin)['number'])")
# echo "PR #${pr_num} created"
Loading