AZ-400 Question 287
Select 2You are a DevOps engineer managing multiple repositories in an organization on GitHub. Your team lead requests visibility into commit activity, pull request trends, and issue closure rates. Additionally, you need to create a custom chart that tracks the number of newly opened issues compared to the number of closed issues per week. Which two actions should you take to meet these requirements?
- A
Enable GitHub Advanced Security for each repository to access code scanning insights and automatically create custom charts for issues and pull requests.
- B
In each repository, navigate to the Insights tab to review commit activity, code frequency, and contributors, and ensure that traffic and graph views are enabled.
- C
Use GitHub� REST or GraphQL APIs to extract issue metadata and feed it into a reporting or visualization tool for the custom chart on open vs. closed issues.
- D
Rename the default branch to 'insights' to allow GitHub to track and display project metrics across your organization.
Show answer and explanation
Correct answers: B, C
Explanation
To enable monitoring in GitHub and create the requested charts, you should first review built-in repository insights under the Insights tab, which covers traffic, commits, code frequency, and contributors. For more advanced or custom monitoring, particularly for issue and pull request data, using GitHub� APIs (REST or GraphQL) helps aggregate and visualize additional metrics in your own dashboards or third-party tools. Refer to GitHub� documentation on Insights (https://docs.github.com/en/repositories/insights) and the GitHub API (https://docs.github.com/en/rest) for details on setting up and customizing these views.
- A. Incorrect.
Incorrect. While GitHub Advanced Security provides code scanning, secret scanning, and dependency reviews, it does not automatically generate custom charts for issues and pull requests. Enabling it is helpful for security, not for the requested monitoring insights.
- B. Correct.
Correct. GitHub provides built-in repository insights, including commits, code frequency, and contributors under the Insights tab. Ensuring this tab is properly enabled and used allows you to monitor these activities out of the box.
- C. Correct.
Correct. To create a custom chart for open vs. closed issues, you can pull data through GitHub APIs (REST or GraphQL) and visualize it using external or custom visualization solutions.
- D. Incorrect.
Incorrect. Renaming the default branch to 'insights' does not enable or configure GitHub Insights. GitHub� default Insights features work independently of the branch name.