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

Add support for merge_group event #432

Closed
masaru-iritani opened this issue Jul 23, 2024 · 5 comments · Fixed by #433
Closed

Add support for merge_group event #432

masaru-iritani opened this issue Jul 23, 2024 · 5 comments · Fixed by #433
Labels

Comments

@masaru-iritani
Copy link
Contributor

Type of issue

Feature Request

Description

Our team uses the merge queue to serialize and validate changes on the default branch. I want to run ShellCheck when a change is added to the merge queue so that I can detect problems (e.g., introduced by a bad merge) before getting them merged to the default branch.

Describe the solution you'd like

I tried creating a change, https://github.com/masaru-iritani/differential-shellcheck/pull/1.

Things I don't understand are:

  • Test suite job failed due to "Error response from daemon: denied". Is there any permission I need for running it?
  • link_to_results function is supposed to return a URL for querying the code scanning results, which I cannot see in this official repository or my fork. How can I understand what kind of URL to be generated?
  • Is the merge queue (able to be) enabled in this repository so that workflows in this repository can test the functionality?
@jamacku
Copy link
Member

jamacku commented Jul 24, 2024

I like your idea, but I have never used merge_group myself. Feel free to open the PR directly. It will start CI, and we can continue from there.

  • Test suite job failed due to "Error response from daemon: denied". Is there any permission I need for running it?

Not sure what exactly happened, but I guess you were missing some permissions. You can try to open PR directly, and it should work that way.

Seems like you hit this issue: https://stackoverflow.com/questions/73302997/why-do-i-get-error-response-from-daemon-denied-when-trying-to-pull-an-image-f

  • link_to_results function is supposed to return a URL for querying the code scanning results, which I cannot see in this official repository or my fork. How can I understand what kind of URL to be generated?

GitHub allows us to see scanning results only for organization members (probably because some findings might be potential security issues). I suppose you don't see them on your fork because you haven't scanned it yet. Committing to main should be enough. It will perform a base scan, and you should see all existing warnings in the Security Dashboard.

But you can check the results of Differential ShellCheck on your PR here - https://github.com/masaru-iritani/differential-shellcheck/actions/runs/10059750767?pr=1#summary-27805683474. You haven't introduced any new ShellCheck warnings.

  • Is the merge queue (able to be) enabled in this repository so that workflows in this repository can test the functionality?

We can try.

@masaru-iritani
Copy link
Contributor Author

Thank you for your prompt response and kind suggestion, @jamacku!

You can try to open PR directly, and it should work that way.

As for the permission issue, I tried opening #433.

Committing to main should be enough.

Yes, after merging my pull request to the main branch of my fork, I'm able to see the code scanning results. The problem is that I cannot enable the merge queue for my fork repository because the feature only supports organization repositories, which I don't have (as an admin). I cannot tell how the link would be for a code scan result of merge_queue.

If you can enable the merge queue in this repository, that would be great. Otherwise, I need to try running my forked workflow in my organization repository, which may cause some disturbance.

@jamacku
Copy link
Member

jamacku commented Jul 26, 2024

I'll try to enable merge_queue for this repo. I wanted to try it for some time anyway. :-)

@jamacku
Copy link
Member

jamacku commented Aug 1, 2024

Native support for the merge_group event is available in v5.4.0.

Thank you, @masaru-iritani, for implementing this feature! I appreciate it.

@masaru-iritani
Copy link
Contributor Author

@jamacku Thank you for your kind support to make this happen 🎉 I'll work on consuming the new version shortly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants