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

ENH Remove restrict creations rule for tag ruleset #55

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions rulesets/tag-ruleset.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
{
"type": "non_fast_forward"
},
{
"type": "creation"
},
{
"type": "update"
}
Expand Down
6 changes: 4 additions & 2 deletions rulesets_command.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,10 @@
// Note: This will read from the "rulesets" directory
// In each of those json rulesets there is "bypass_actors"."actor_id" = 5
// This translates to the "Repository admin" role
// It has been confirmed that the github-action user is able to bypass the ruleset as
// it has the "Organisation admin" role which is one level above the "Repository admin" role
//
// Note that the github-action user appears to have NO bypass permissions (not even write),
// even if it has the `contents: write` permission on the job that is running the action
//
$branchRuleset = create_ruleset('branch', $additionalBranchConditions);
$tagRuleset = create_ruleset('tag');

Expand Down
3 changes: 3 additions & 0 deletions run.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
const TOOL_URL = 'https://github.com/silverstripe/module-standardiser';
const PR_TITLE = 'MNT Run module-standardiser';
const PR_DESCRIPTION = 'This pull-request was created automatically by [module-standardiser](' . TOOL_URL . ')';

// DO NOT change these constants or else new ruleset will be created instead of
Copy link
Member

Choose a reason for hiding this comment

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

Lol we may as well put them in the JSON files like I said originally then... But no matter, we'll leave as is now.

// updating existing rulesets and we'll end up with 2x rulesets
const BRANCH_RULESET_NAME = 'Silverstripe CMS branch ruleset';
const TAG_RULESET_NAME = 'Silverstripe CMS tag ruleset';

Expand Down
Loading