Skip to content

Conversation

@mcafaro
Copy link
Member

@mcafaro mcafaro commented Jun 24, 2025

This change adds an alert to the top of the page when a user clicks the "Generate Workflow" button. The alert allows them to manually download the matlab.yml file and add it to their .github/workflows folder if the automatic creation does not work.

There are two scenarios where automatic creation will fail:

  • The repo does not have a "main" branch.
  • The repo does not exist or cannot be accessed.

In these cases, the "Generate Workflow" button will open a new window that shows a GitHub 404 page. After closing that window, hopefully the user will see this alert to further assist them.

We cannot detect these scenarios without calling GitHub APIs, which adds complexity that doesn't feel worth it at the moment (rate limits, tokens, etc). This alert fallback felt like a reasonable compromise for now.

Screenshot 2025-06-24 at 10 42 50 AM

Closes #2 and #6

@mw-hrastega
Copy link
Member

This change adds an alert to the top of the page when a user clicks the "Generate Workflow" button. The alert allows them to manually download the matlab.yml file and add it to their .github/workflows folder if the automatic creation does not work.

There are two scenarios where automatic creation will fail:

  • The repo does not have a "main" branch.
  • The repo does not exist or cannot be accessed.

In these cases, the "Generate Workflow" button will open a new window that shows a GitHub 404 page. After closing that window, hopefully the user will see this alert to further assist them.

We cannot detect these scenarios without calling GitHub APIs, which adds complexity that doesn't feel worth it at the moment (rate limits, tokens, etc). This alert fallback felt like a reasonable compromise for now.

Screenshot 2025-06-24 at 10 42 50 AM Closes #2 and #6

If the user clicks the link, will they be provided with the expected YAML code? To access the code, will clicking the link be the only way to access the generated code?

@mcafaro
Copy link
Member Author

mcafaro commented Jun 24, 2025

If the user clicks the link, will they be provided with the expected YAML code? To access the code, will clicking the link be the only way to access the generated code?

If the user clicks the link, they will be asked to download a "matlab.yml" file which contains the expected YAML code. They can then put that file in their repository manually.

@mw-hrastega
Copy link
Member

If the user clicks the link, will they be provided with the expected YAML code? To access the code, will clicking the link be the only way to access the generated code?

If the user clicks the link, they will be asked to download a "matlab.yml" file which contains the expected YAML code. They can then put that file in their repository manually.

What do you think about this text?

If the generated workflow does not automatically appear in your workflow editor, manually download the workflow file (matlab.yml) and save it to the .github/workflows folder of your repository.

@mcafaro
Copy link
Member Author

mcafaro commented Jun 24, 2025

What do you think about this text?

If the generated workflow does not automatically appear in your workflow editor, manually download the workflow file (matlab.yml) and save it to the .github/workflows folder of your repository.

Sounds good to me. And just the "matlab.yml" text will be the hyperlink?

@mcafaro
Copy link
Member Author

mcafaro commented Jun 24, 2025

I refined it slightly. Let me know what you think.

Screenshot 2025-06-24 at 4 14 51 PM

@mw-hrastega
Copy link
Member

I refined it slightly. Let me know what you think.

Screenshot 2025-06-24 at 4 14 51 PM

Looks great!

@mw-hrastega
Copy link
Member

What do you think about this text?
If the generated workflow does not automatically appear in your workflow editor, manually download the workflow file (matlab.yml) and save it to the .github/workflows folder of your repository.

Sounds good to me. And just the "matlab.yml" text will be the hyperlink?

Yes, you got it right.

@mcafaro mcafaro merged commit 2eedb18 into main Jun 25, 2025
1 check passed
@mcafaro mcafaro deleted the alert branch June 25, 2025 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Behavior for repository doesn't have a main branch

4 participants