github-community-projects / github-community-projects/safe-settings

Implement ability to require workflows to pass before merging in organization repository rulesets

Open
#607 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
921
Forks
226
Avg merge
18h 3m
Merged PRs (30d)
14

Description

## Prerequisites:

* Is the functionality available in the GitHub UI? If so, please provide a link to information about the feature.
(https://docs.github.com/en/enterprise-cloud@latest/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/available-rules-for-rulesets#require-workflows-to-pass-before-merging)

* Is the functionality available through the GitHub API? If the functionality is available, please provide links to the
API documentation (https://developer.github.com/v3/) as well as the Octokit documentation (https://octokit.github.io/).
(https://docs.github.com/en/rest/orgs/rules?apiVersion=2022-11-28#create-an-organization-repository-ruleset)

* If the functionality is not yet available in the API, it would be helpful if you
contacted support (https://support.github.com/) or posted in the Community Forum (https://github.community/). Please
include a link to the forum post if you create one or a copy of the response from support.

## New Feature

Please describe the desired new functionality:

After trying to implement an organization repository ruleset via safe-settings, I have been unable to require a workflow to pass before merging in the ruleset. This is currently an option in the UI when creating a repository ruleset for an organization, and it can also be implemented via the API.

I did not see this as an option in the safe-settings example docs, but I did try this in the rules section of the repository ruleset:
```
rules:
- type: deletion
- type: non_fast_forward
- type: workflows
parameters:
workflows:
- path: .github/workflows/check.yml
ref: main
repository_id: 349423409
```

This did not work for me, so I'm assuming this is either not implemented, or I have an error in the above. Any feedback for this feature?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.