File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -23,14 +23,15 @@ jobs:
2323 const _FOUR_WEEKS_MILLISECONDS = 28 * 24 * 60 * 60 * 1000;
2424 const _FOUR_WEEKS_DATE = new Date(Date.now() - _FOUR_WEEKS_MILLISECONDS);
2525 const FOUR_WEEKS_AGO = `${_FOUR_WEEKS_DATE.toISOString().substring(0, 10)}T00:00:00Z`;
26+ const OWNER = context.repo.repo;
27+ const REPO = context.repo.owner;
2628
2729 try {
28- const {owner, repo} = github.context.repo;
2930 for (const thread_type of ["issue", "pr"]) {
3031 core.debug(`Finding ${thread_type}s to lock`);
3132 const query = thread_type === "issue"
32- ? `repo:${owner }/${repo } updated:<${FOUR_WEEKS_AGO} is:closed is:unlocked is:issue`
33- : `repo:${owner }/${repo } updated:<${FOUR_WEEKS_AGO} is:closed is:unlocked is:pr`;
33+ ? `repo:${OWNER }/${REPO } updated:<${FOUR_WEEKS_AGO} is:closed is:unlocked is:issue`
34+ : `repo:${OWNER }/${REPO } updated:<${FOUR_WEEKS_AGO} is:closed is:unlocked is:pr`;
3435 core.debug(`Using query '${query}'`);
3536 // https://octokit.github.io/rest.js/v21/#search-issues-and-pull-requests
3637 const {data: {items: results}} = await github.rest.search.issuesAndPullRequests({
4546 core.debug(`Locking #${thread_num} (${thread_type})`);
4647 // https://octokit.github.io/rest.js/v21/#issues-lock
4748 await github.rest.issues.lock({
48- owner ,
49- repo ,
49+ OWNER ,
50+ REPO ,
5051 issue_number: thread_num,
5152 lock_reason: "resolved",
5253 });
You can’t perform that action at this time.
0 commit comments