awslabs / amazon-eks-ami

Packer configuration for building a custom EKS AMI
https://awslabs.github.io/amazon-eks-ami/
MIT No Attribution
2.42k stars 1.14k forks source link

bug(bot): fix handling of listFiles response #1856

Closed cartermckinnon closed 3 months ago

cartermckinnon commented 3 months ago

Description of changes:

Type returned by listFiles was handled incorrectly in #1750, tested this fix locally with:

const { Octokit } = require("@octokit/rest");

const octokit = new Octokit();

const res = octokit.rest.pulls
  .listFiles({
    owner: "awslabs",
    repo: "amazon-eks-ami",
    pull_number: 1750
});

res.then((files) => {
  for (const file of files.data) {
    console.log(file.filename);
  }
});

Output:

.github/actions/bot/index.js

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.