Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Unable to get latest deployment for a workflow deployed to an environment #2649

Open
1 task done
mssanjay opened this issue Apr 2, 2024 · 1 comment
Open
1 task done
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone Type: Support Any questions, information, or general needs around the SDK or GitHub APIs

Comments

@mssanjay
Copy link

mssanjay commented Apr 2, 2024

What happened?

``Hi, I am trying to build a report for all of my deployments for our product which has about 15+ repos. I like to create a Github Page with all the repos listed with their workflows and deployments for the 4 environments I have.
I was able to get latest deployment but it could be any of the workflow. So, my problem is that I am unable to get latest deployment for an environment for a specific workflow. How can I get this info?

Here is what I am using currently

  1. For repo details,
octokit.repos.get({
    owner: REPO_OWNER,
    repo,
  });
  1. For list of workflows
 octokit.actions.listRepoWorkflows({
      owner: REPO_OWNER,
      repo: repo,
    });

But for deployments, below API does not offer workflow as input. So, how can I go about getting the data for a specific workflow deployment action?

octokit.repos.listDeployments({
    owner: REPO_OWNER,
    repo: repositoryDetails.name,
    environment: environment,
    per_page: 1,
    page: 1,
  });

Thanks
Sanjay

Versions

"@octokit/rest": "20.0.2"

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@mssanjay mssanjay added Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented labels Apr 2, 2024
Copy link

github-actions bot commented Apr 2, 2024

👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀

@github-project-automation github-project-automation bot moved this to 🆕 Triage in 🧰 Octokit Active Apr 2, 2024
@wolfy1339 wolfy1339 added Type: Support Any questions, information, or general needs around the SDK or GitHub APIs and removed Type: Bug Something isn't working as documented labels Apr 2, 2024
@nickfloyd nickfloyd moved this from 🆕 Triage to 👀 In review in 🧰 Octokit Active Apr 8, 2024
@kfcampbell kfcampbell added Status: Up for grabs Issues that are ready to be worked on by anyone and removed Status: Triage This is being looked at and prioritized labels Apr 15, 2024
@nickfloyd nickfloyd moved this from 👀 In review to 🔥 Backlog in 🧰 Octokit Active Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone Type: Support Any questions, information, or general needs around the SDK or GitHub APIs
Projects
Status: 🔥 Backlog
Development

No branches or pull requests

3 participants