Skip to content

Start area for grading actions #28

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

Closed
wants to merge 10 commits into from
Closed

Start area for grading actions #28

wants to merge 10 commits into from

Conversation

chriswblake
Copy link
Member

This pull request introduces two new GitHub Actions to support grading workflows: "Check all Results" and "Check Repository Setting". The changes include the addition of action definitions and documentation to guide users on how to implement these actions.

New GitHub Actions:

  • Check all Results Action:

    • Added action.yml to define the "Check all Results" action, which aggregates the results of multiple grading actions and returns a boolean indicating if all checks have passed.
    • Added README.md to document the usage.
  • Check Repository Setting Action:

    • Added action.yml to define the "Check Repository Setting" action, including required and optional inputs, and the logic to check the repository setting.
    • Added README.md to document the usage.

@chriswblake chriswblake self-assigned this Apr 15, 2025
@chriswblake
Copy link
Member Author

@FidelusAleksander Please take a look and provide feedback about how we want to introduce this concept into the toolkit.
I've captured my current ideas in the readme files.

Copy link
Contributor

@FidelusAleksander FidelusAleksander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this has potential.

Let's not merge this yet, I will experiment with grading workflows too - In this implementation I worry that this is too specific to the use case. The jsons are matching between two different actions and built in a way to match what the markdown template requires.

Comment on lines 9 to 13
- `check-name`: The name of the check that will appear in the results
- `setting-name`: The full path to the [repository setting](https://docs.github.com/en/rest/repos/repos?apiVersion=2022-11-28#get-a-repository) to check, using dot notation. Example `owner.login`
- `setting-expected-value`: The expected value of the repository setting
- `pass-message`: The message to return if the check passes
- `fail-message`: The message to return if the check fails
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this may be too specific to the use case.
Initial thoughts is to keep the action to only check the setting value

And the outputs would be:

  • passed: boolean
  • actual-value: string (not sure about this one)
Suggested change
- `check-name`: The name of the check that will appear in the results
- `setting-name`: The full path to the [repository setting](https://docs.github.com/en/rest/repos/repos?apiVersion=2022-11-28#get-a-repository) to check, using dot notation. Example `owner.login`
- `setting-expected-value`: The expected value of the repository setting
- `pass-message`: The message to return if the check passes
- `fail-message`: The message to return if the check fails
- `setting-name`: The full path to the [repository setting](https://docs.github.com/en/rest/repos/repos?apiVersion=2022-11-28#get-a-repository) to check, using dot notation. Example `owner.login`
- `setting-expected-value`: The expected value of the repository setting
Suggested change
- `check-name`: The name of the check that will appear in the results
- `setting-name`: The full path to the [repository setting](https://docs.github.com/en/rest/repos/repos?apiVersion=2022-11-28#get-a-repository) to check, using dot notation. Example `owner.login`
- `setting-expected-value`: The expected value of the repository setting
- `pass-message`: The message to return if the check passes
- `fail-message`: The message to return if the check fails
- `setting-key`: The full path to the [repository setting](https://docs.github.com/en/rest/repos/repos?apiVersion=2022-11-28#get-a-repository) to check, using dot notation. Example `owner.login`
- `setting-expected-value`: The expected value of the repository setting

```yml
- name: Overall Check
id: check-combined-results
uses: skills/exercise-toolkit/.github/workflows/grading/check-all-results@cwb
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure but I think this entire action can be replaced by

   ` if: steps.*.outcome != 'success'`

@FidelusAleksander
Copy link
Contributor

As discussed the GITHUB_TOKEN in github actions does not allow to view repository settings

@chriswblake chriswblake deleted the cwb branch July 5, 2025 02:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants