Skip to content
Merged
Show file tree
Hide file tree
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
9 changes: 9 additions & 0 deletions internal/scaffold/fullsend-repo/scripts/post-triage-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,15 @@ run_test_stdout "prerequisites-skips-disallowed-target" \
'{"action":"prerequisites","reasoning":"needs upstream fix","prerequisites":{"existing":[],"create":[{"repo":"disallowed-org/other-repo","title":"Need Y","body":"We need Y."}]},"comment":"Blocked on upstream work."}' \
"::warning::Skipping issue creation in 'disallowed-org/other-repo'"

# Verify prerequisites handler works without GITHUB_WORKSPACE set (local execution).
# Temporarily unset GITHUB_WORKSPACE to exercise the :-/tmp fallback guard (#2458).
# The script must not crash with an unbound variable error under set -u.
unset GITHUB_WORKSPACE
run_test "prerequisites-no-github-workspace-fallback" \
'{"action":"prerequisites","reasoning":"needs upstream fix","prerequisites":{"existing":[{"url":"https://github.com/other-org/other-repo/issues/99"}],"create":[]},"comment":"This issue is blocked on an upstream dependency."}' \
"gh issue comment 42 --repo test-org/test-repo --body-file -"
export GITHUB_WORKSPACE="${WORKSPACE}"

run_test "question-posts-comment" \
'{"action":"question","reasoning":"issue is asking a question","comment":"Based on the repository docs, Python 4 is not currently supported.\n\nDid this answer your question, or would you like to open a feature request for Python 4 support?"}' \
"gh issue comment 42 --repo test-org/test-repo --body-file -"
Expand Down
4 changes: 2 additions & 2 deletions internal/scaffold/fullsend-repo/scripts/post-triage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,10 @@ case "${ACTION}" in

# Read the allowlist from config.yaml. The config repo is checked out
# at $GITHUB_WORKSPACE by the reusable workflow.
CONFIG_FILE="${GITHUB_WORKSPACE}/config.yaml"
CONFIG_FILE="${GITHUB_WORKSPACE:-/tmp}/config.yaml"
if [[ ! -f "${CONFIG_FILE}" ]]; then
# Per-repo mode: config is under .fullsend/
CONFIG_FILE="${GITHUB_WORKSPACE}/.fullsend/config.yaml"
CONFIG_FILE="${GITHUB_WORKSPACE:-/tmp}/.fullsend/config.yaml"
fi

ALLOWED_ORGS=""
Expand Down
Loading