threadlines 0.1.14 → 0.1.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,6 +7,19 @@ exports.getAutoReviewTarget = getAutoReviewTarget;
7
7
  const chalk_1 = __importDefault(require("chalk"));
8
8
  function getAutoReviewTarget() {
9
9
  console.log(chalk_1.default.gray(' [DEBUG] getAutoReviewTarget: Starting detection...'));
10
+ // Log ALL GitHub Actions env vars that start with GITHUB_ to see what's available
11
+ if (process.env.GITHUB_ACTIONS) {
12
+ console.log(chalk_1.default.gray(' [DEBUG] getAutoReviewTarget: All GITHUB_* env vars:'));
13
+ const githubVars = Object.keys(process.env)
14
+ .filter(key => key.startsWith('GITHUB_'))
15
+ .sort();
16
+ githubVars.forEach(key => {
17
+ const value = process.env[key];
18
+ // Truncate long values for readability
19
+ const displayValue = value && value.length > 100 ? value.substring(0, 100) + '...' : value;
20
+ console.log(chalk_1.default.gray(` ${key} = "${displayValue || 'NOT SET'}"`));
21
+ });
22
+ }
10
23
  // 1. Check for PR/MR context (most authoritative)
11
24
  // GitHub Actions PR
12
25
  console.log(chalk_1.default.gray(` [DEBUG] getAutoReviewTarget: Checking GitHub Actions PR...`));
@@ -14,10 +27,14 @@ function getAutoReviewTarget() {
14
27
  if (process.env.GITHUB_EVENT_NAME === 'pull_request') {
15
28
  const targetBranch = process.env.GITHUB_BASE_REF;
16
29
  const sourceBranch = process.env.GITHUB_HEAD_REF;
17
- const prNumber = process.env.GITHUB_EVENT_PULL_REQUEST_NUMBER;
30
+ // Try multiple possible env var names for PR number
31
+ const prNumber = process.env.GITHUB_EVENT_PULL_REQUEST_NUMBER ||
32
+ process.env.GITHUB_PR_NUMBER ||
33
+ process.env.GITHUB_EVENT_NUMBER;
18
34
  console.log(chalk_1.default.gray(` [DEBUG] getAutoReviewTarget: GITHUB_BASE_REF = "${targetBranch || 'NOT SET'}"`));
19
35
  console.log(chalk_1.default.gray(` [DEBUG] getAutoReviewTarget: GITHUB_HEAD_REF = "${sourceBranch || 'NOT SET'}"`));
20
- console.log(chalk_1.default.gray(` [DEBUG] getAutoReviewTarget: GITHUB_EVENT_PULL_REQUEST_NUMBER = "${prNumber || 'NOT SET'}"`));
36
+ console.log(chalk_1.default.gray(` [DEBUG] getAutoReviewTarget: GITHUB_EVENT_PULL_REQUEST_NUMBER = "${process.env.GITHUB_EVENT_PULL_REQUEST_NUMBER || 'NOT SET'}"`));
37
+ console.log(chalk_1.default.gray(` [DEBUG] getAutoReviewTarget: GITHUB_EVENT_NUMBER = "${process.env.GITHUB_EVENT_NUMBER || 'NOT SET'}"`));
21
38
  if (targetBranch && sourceBranch && prNumber) {
22
39
  console.log(chalk_1.default.green(` [DEBUG] getAutoReviewTarget: Detected GitHub PR #${prNumber}`));
23
40
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "threadlines",
3
- "version": "0.1.14",
3
+ "version": "0.1.15",
4
4
  "description": "Threadline CLI - AI-powered linter based on your natural language documentation",
5
5
  "main": "dist/index.js",
6
6
  "bin": {