Skip to content

Commit

Permalink
update context
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinslin committed Sep 12, 2023
1 parent 9412174 commit 9c6b35b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/scripts/generate-weekly-report.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ async function getNewIssues({github, context}) {

async function getTargetLabelIssues({octokit, labels, filterPrs, context}) {
const queryParams = {
owner: context.repository_owner,
owner: context.payload.repository.owner.login,
repo: 'opentelemetry-collector-contrib',
state: 'open',
per_page: 100, // Number of items per page (maximum allowed)
Expand Down Expand Up @@ -245,7 +245,7 @@ function generateReport({ issuesData, previousReport, componentData }) {
async function createIssue({ github, lookbackData, report, context }) {
const title = `Weekly Report: ${lookbackData.sevenDaysAgo.toISOString().slice(0, 10)} - ${lookbackData.midnightYesterday.toISOString().slice(0, 10)}`;
return github.rest.issues.create({
owner: context.repository_owner,
owner: context.payload.repository.owner.login,
repo: "opentelemetry-collector-contrib",
title,
body: report,
Expand All @@ -255,7 +255,7 @@ async function createIssue({ github, lookbackData, report, context }) {

async function getLastWeeksReport({ github, since, context }) {
const issues = await github.rest.issues.listForRepo({
owner: context.repository_owner,
owner: context.payload.repository.owner.login,
repo: 'opentelemetry-collector-contrib',
state: 'all', // To get both open and closed issues
labels: ["report"],
Expand Down

0 comments on commit 9c6b35b

Please sign in to comment.