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

Quickstart: check if action is run in context of template repository by looking at github.event.repository.template_repository #2

Conversation

gr2m
Copy link

@gr2m gr2m commented Mar 9, 2022

Why:

Checking for github.event.repository.template_repository makes it work for all courses, not only githublearn/* repositories

What's being changed:

Just a suggestion. But I think this makes it more generic?

I originally thought the expression was incorrect because on https://githublearn.github.io/.github/quickstart it only shows

    if: $

But that seems to be an unrelated rendering problem?

image

Check off the following:

  • For workflow changes, I have verified the Actions workflows function as expected.
  • For content changes, I have reviewed the style guide.

…by looking at `github.event.repository.template_repository`

Just a suggestion. But I think this makes it more generic?

I originally thought the expression was incorrect because on https://githublearn.github.io/.github/quickstart it only shows 

```
    if: $
```

But that seems to be an unrelated rendering probleem?
@heiskr
Copy link
Contributor

heiskr commented Apr 11, 2022

Thanks for noticing this issue 🎉 This file now lives in github.com/github/skills and I've added {% raw %} to address the rendering issue, and it now appropriately checks is_template :)

Screen Shot 2022-04-11 at 2 05 51 PM

@heiskr heiskr closed this Apr 11, 2022
@heiskr heiskr deleted the use-repository.template_repository-to-check-if-run-in-template-repository branch April 11, 2022 21:07
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.

2 participants