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

automation to help with bug reports #9351

Closed
chris48s opened this issue Jul 3, 2023 · 7 comments · Fixed by #9386
Closed

automation to help with bug reports #9351

chris48s opened this issue Jul 3, 2023 · 7 comments · Fixed by #9386
Assignees
Labels
developer-experience Dev tooling, test framework, and CI

Comments

@chris48s
Copy link
Member

chris48s commented Jul 3, 2023

📋 Description

Usually if someone files a bug report, the first thing I do is use npm run badge locally to get some additional information.

It would be nice if we had a GitHub actions workflow that fires when a new issue is opened and does the following:

If the user filled in the "bug report" template AND filled in "shields.io" in the "Are you experiencing an issue with..." field AND filled in a URL in the "Link to the badge" field then...

  • Extract the value from "Link to the badge" to $URL
  • Spin up an environment
  • Run npm run badge $URL
  • Capture the output and post it as an issue comment in a code fence (make it clear this was posted by a bot)

It might be that we need to tweak the issue template yaml a bit to make this easier?

@chris48s chris48s added the developer-experience Dev tooling, test framework, and CI label Jul 3, 2023
@calebcartwright
Copy link
Member

That sounds like a non-trivial thing to do, but it would be awesome

@jNullj
Copy link
Collaborator

jNullj commented Jul 8, 2023

seems easy, assign me if you want, i can get it done.

@jNullj
Copy link
Collaborator

jNullj commented Jul 15, 2023

I am working on this and i got a question regarding the issue bug template.
The template adds the question label to new bug report, why don't we just use the bug label right away? does question means it is waiting to be confirmed as a bug?

I want to github workflow to get an indication that the issue is relevant using label to avoid running on all issues:
Which of the following is preferred?

  1. Create a bot specific label, when the label is added trigger the workflow, remove the label before exit - allows manual trigger
  2. Trigger only on issue creation when the question label is present - avoid changes to current template - no manual trigger
  3. Trigger only on issue creation with a new dedicated label - avoid binding existing label to new feature - no manual trigger

@chris48s
Copy link
Member Author

Yes those issues get raised as "question" to start with. We'll label it as a bug after triage if it actually is one.

Only 1_Bug_report.yml applies the "question" label and users who aren't repo collaborators can't label issues. I think just using the "question" label is fine.

@jNullj
Copy link
Collaborator

jNullj commented Jul 15, 2023

I am almost done, but i found some issue regarding the requirement to put the test output in a comment.
Some outputs might be longer then github's limit of chars per comment. For example when trying to run this npm run badge https://img.shields.io/docker/v/xuxiaoweicomcn/gitlab-runner-helper?sort=semver&versionPrefix=x86_64

I could link to the GH actions that run the task instead. I might be able to output it to a file and link to it/upload it to the comment.
Let me know if you know another way of presenting the output and what you prefer

@chris48s
Copy link
Member Author

I had not thought about that. I reckon if the output is too long, lets just post a link to the build as a starting point (as you've suggested). We can always tweak/improve this later.

@jNullj
Copy link
Collaborator

jNullj commented Jul 15, 2023

Here is an example.
image
I am on the road, will PR once im home

jNullj added a commit to jNullj/shields-fun-fork that referenced this issue Jul 15, 2023
Devs run `npm run badge` often when getting a bug report for shields.io service.
This PR automates this tests so the maintainer can get test results automaticly when getting into a new ticket.
Add test-bug-run-badge.yml workflow for github actions automation.

Will only run if bug has the 'qeustion' label added by bug reporting template. And will only setup enviorment and perform the test if the link provided in the issue is valid and the issue is related to shields.io.
Link to job results is sent as a new comment on the issue.

Resolves badges#9351
jNullj added a commit to jNullj/shields-fun-fork that referenced this issue Jul 21, 2023
Devs run `npm run badge` often when getting a bug report for shields.io service.
This PR automates this tests so the maintainer can get test results automaticly when getting into a new ticket.
Add test-bug-run-badge.yml workflow for github actions automation.

Will only run if bug has the 'qeustion' label added by bug reporting template. And will only setup enviorment and perform the test if the link provided in the issue is valid and the issue is related to shields.io.
Link to job results is sent as a new comment on the issue.

Resolves badges#9351
github-merge-queue bot pushed a commit that referenced this issue Jul 22, 2023
* devops: automate bug report tests

Devs run `npm run badge` often when getting a bug report for shields.io service.
This PR automates this tests so the maintainer can get test results automaticly when getting into a new ticket.
Add test-bug-run-badge.yml workflow for github actions automation.

Will only run if bug has the 'qeustion' label added by bug reporting template. And will only setup enviorment and perform the test if the link provided in the issue is valid and the issue is related to shields.io.
Link to job results is sent as a new comment on the issue.

Resolves #9351

* remove secrets to avoid secret leak

* change stage name

* remove unused id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
developer-experience Dev tooling, test framework, and CI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants