Skip to content

Commit

Permalink
fix: update dist
Browse files Browse the repository at this point in the history
  • Loading branch information
arminbro committed Nov 11, 2024
1 parent b8cf631 commit debb939
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/repo-pruner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Run Repo Pruner
uses: arminbro/repo-pruner@v1.0.2
uses: arminbro/repo-pruner@v1.0.3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Run Repo Pruner
uses: arminbro/repo-pruner@v1.0.2
uses: arminbro/repo-pruner@v1.0.3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down
8 changes: 7 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29940,8 +29940,12 @@ const core = __importStar(__nccwpck_require__(7484));
const github = __importStar(__nccwpck_require__(3228));
async function run() {
try {
// Get token
const token = process.env.GITHUB_TOKEN;
if (!token) {
throw new Error(`GITHUB_TOKEN environment variable is not set`);
}
// Get input values
const token = core.getInput('repo-token', { required: true });
const inactiveDays = parseInt(core.getInput('inactive_days') || '30');
const baseBranch = core.getInput('base_branch') || 'main';
const octokit = github.getOctokit(token);
Expand Down Expand Up @@ -29983,6 +29987,8 @@ async function run() {
if (!lastCommitDate) {
throw new Error(`Branch ${branch.name} is missing the last commit date.`);
}
console.log('lastCommitDate', lastCommitDate);
console.log('thresholdDate', thresholdDate);
if (lastCommitDate < thresholdDate) {
// Branch is inactive
const branchName = branch.name;
Expand Down
3 changes: 3 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ async function run() {
throw new Error(`Branch ${branch.name} is missing the last commit date.`);
}

console.log('lastCommitDate', lastCommitDate);
console.log('thresholdDate', thresholdDate);

if (lastCommitDate < thresholdDate) {
// Branch is inactive
const branchName = branch.name;
Expand Down

0 comments on commit debb939

Please sign in to comment.