github-community-projects / github-community-projects/issue-metrics

Combining multiple reports into a single GitHub issue

Open
#156 5 comments 0 reactions 0 assignees View on GitHub
enhancement keep
Dominant language
Python
Stars
538
Forks
94
Avg merge
49m
Merged PRs (30d)
13

Description

In https://github.com/InnerSourceCommons/InnerSourcePatterns/pull/599 I learned that it is possible already to merge multiple reports into a single reports by apply a smart concatenation of multiple GHA steps. Very cool!

Here an example of how the resulting combined report looks like:
https://github.com/InnerSourceCommons/InnerSourcePatterns/issues/601

I had some possible improvement ideas, related to this "combined reports" scenario:

## Custom report title

The top-level title in the GitHub issue is always "Issue Metrics" right now. That is not really an issue if the GitHub issue only contains a single report, as the title of the GitHub issue itself can be used to provide a customized description of what the report is about.

However when a single GitHub issue contains multiple reports, this becomes more tricky.

Therefore we could add a configuration value `REPORT_TITLE`, roughly like this:

field | required | default | description
-- | -- | -- | --
`REPORT_TITLE` | false | "Issue Metrics" | A custom title that will be printed at the very top of the report. _Note:_ Most useful when combining multiple reports into a single issue.

## Custom output file

The issue_metrics GHA always writes to the file `issue_metrics.md`.

When combining multiple reports into a single issue it would be helpful to write to different filenames, so that those files can then be concatenated into a single file, which is then written to a GitHub issue.

field | required | default | description
-- | -- | -- | --
`OUTPUT_FILE` | false | issue_metrics.md | A custom output file that the report will be written to. _Note:_ Most useful when combining multiple reports into a single issue.

## Always print the title and the search query

As shown in https://github.com/InnerSourceCommons/InnerSourcePatterns/issues/601, an empty report will only say "no issues found for the given search criteria".

It would be helpful to always print the title, as well as the search query that was used.

That helps will debugging and identifying what the specific report was meant to be about.
```[tasklist]
### Tasks
- [ ] https://github.com/github/issue-metrics/pull/157
- [ ] https://github.com/github/issue-metrics/pull/160
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.