心疼是什么意思| ur是什么缩写| 跑龙套是什么意思| 肝火胃火旺盛吃什么药| 口炎是什么字| 属猪男和什么属相最配| 软绵绵的什么| 孟字五行属什么| 梦见自己换衣服是什么意思| 水过鸭背是什么意思| 金生水是什么意思| 硫黄和硫磺有什么区别| 獐是什么动物| 为什么上小厕会有刺痛感| 男人左眼跳是什么预兆| 狮子座女和什么星座最配| 老是做噩梦是什么原因| 一什么土| 雷锋是什么生肖| 心包填塞三联征是什么| 头发的主要成分是什么| 黄瓜炒什么| 小腹坠胀是什么原因| 关节炎挂什么科| ala是什么氨基酸| 什么相处| jz是什么意思| 玉树临风是什么生肖| 脚趾长痣代表什么意思| 肚子胀是什么原因引起的| 畏寒怕冷是什么原因| 清肺火肺热吃什么药最有效| 腺苷钴胺片治什么病| 脚酸疼是什么原因引起的吗| 湿热带下是什么意思| 喝枸杞有什么好处| 四季平安是什么生肖| 梦见自己的手镯断了什么意思| 1887年属什么生肖| 乳房皮肤痒是什么原因| 安宫牛黄丸治什么病| 硬化症是什么病| 脚软没力气是什么原因引起的| 方兴未什么| 转氨酶高是什么病| 梦见自己拉粑粑是什么意思| se是什么意思| 径行是什么意思| 肛门下坠感是什么症状| 女人喜欢什么样的阴茎| 中医学专业学什么| 一个土一个贝念什么| 报考军校需要什么条件| 凉面是用什么面做的| 灵隐寺求什么最灵| 硫酸羟氯喹片是治什么病| 行尸走肉什么意思| 口渴是什么病的症状| 爵迹小说为什么不写了| 罪对什么| 小孩老咳嗽是什么原因| 梦见吵架是什么意思| 卯是什么生肖| 粉尘作业时必须佩戴什么口罩| 梦见老鼠是什么预兆| 叶子是什么意思| 什么是情感障碍| 过敏性哮喘吃什么药| 交通运输是干什么的| 绿茶不能和什么一起吃| 为什么医生说直肠炎不用吃药| 马齿苋有什么功效| 爱钻牛角尖是什么意思| 重阳节又称什么节| 阳历5月20日是什么星座| 治便秘什么药最好| 咳嗽痰多是什么原因| 玉兰片和竹笋有什么区别| 补钙过量有什么害处| 呆若木鸡的意思是什么| 三伏天喝什么汤最好| 什么是宫颈纳囊| 教师节该送什么礼物| 女人更年期吃什么药| nlp是什么| 1月22日什么星座| 手术后可以吃什么| supreme是什么牌子| 情志病是什么意思| nt 是什么检查| 浅表性胃炎用什么药| 一夫一妻制产生于什么时期| 睡觉磨牙是什么情况| 宽宏大度是什么生肖| copd什么意思| 硫酸亚铁是什么东西| 重阳节干什么| 豆沙色是什么颜色| 老上火是什么原因造成的| 山东有什么好吃的| amp是什么意思| 牙膏洗脸有什么好处和坏处| 来月经喝啤酒有什么影响| 为什么会得幽门螺旋杆菌| 皮肤发白一块一块的是什么病| 黄疸高是什么原因| 乳化是什么意思| 女团是什么意思| 膝盖跪着疼是什么原因| 炁是什么意思| 得了乙肝有什么症状| 荷尔蒙是什么东西起什么作用| 猫代表什么数字| 阴道炎用什么药好| 转氨酶高有什么症状| 苦荞茶有什么功效| 汪字五行属什么| 腰腿疼痛吃什么药效果好| ha是什么单位| 牙根变黑是什么原因| 节令是什么意思| 路人甲是什么意思| 气血不足吃什么| mr和mri有什么区别| 蓝精灵是什么药| 孕妇吃梨有什么好处| 50元人民币什么时候发行的| 快闪店是什么意思| 天津为什么叫天津卫| 牡丹王是什么茶| 安宫丸什么时候吃| 什么情况| 开塞露的成分是什么| ptp是什么意思| 老巫婆是什么意思| 骨强度不足是什么原因| 什么是大三阳| 吃豆角中毒什么症状| ed患者是什么意思| 玉米什么时候种| 为什么会有地震| 女人吃什么排湿气最快| 咳出痰带血是什么原因| 拔罐后发痒是什么原因| 陈皮泡水喝有什么作用| 预包装食品指的是什么| 吕布属什么生肖| 左手小手指麻木是什么原因引起的| 查胃病做什么检查合适| 一直鼻塞是什么原因| 不打破伤风针会有什么后果| 仓鼠吃什么蔬菜| 偏头痛吃什么药最好| 梦见尸体是什么意思| 羊水栓塞是什么原因引起的| 3月是什么星座的| 叉烧是什么肉做的| 败血症吃什么药| 素海参是什么做的| 棕色是什么颜色| 脸一边大一边小是什么原因| 孕妇能喝什么茶| 氯硝西泮片是什么药| 雌激素分泌过多是什么原因引起的| 唵嘛呢叭咪吽是什么意思| 炸腮有什么症状| 半夜醒是什么原因| 肠胃湿热吃什么药| 八段锦是什么| 什么零食热量低有利于减肥| 吃什么避孕药可以推迟月经| 十一月二十二是什么星座| 最快的减肥运动是什么| spss是什么| 95511是什么号码| 水化是什么意思| 孕早期有什么症状| 硫酸亚铁是什么东西| 半什么半什么的成语| 5月5号什么星座| 小动脉瘤是什么意思| 妊娠阴性是什么意思| 长智齿牙龈肿痛吃什么药| 血压低有什么危险| 梦见自己和别人吵架是什么意思| 索性是什么意思| 甲胎蛋白偏低说明什么| 话说多了声音嘶哑是什么原因| 打胎后要注意什么| 双子座男和什么座最配对| 红斑狼疮吃什么药最好| 血压测不出来什么原因| 怡字属于五行属什么| navigare是什么牌子| 敏感的反义词是什么| 花重锦官城的重是什么意思| 什么奶茶最好喝| 拉肚子是什么原因引起的怎么办| 消化内科主要看什么病| 后厨是做什么的| 软化血管吃什么药最好| 嘴干是什么原因| 上午十点到十一点是什么时辰| 肌酐偏低有什么危害| 经常流鼻血是什么病的前兆| 为什么尽量抽混合型烟| 火龙果是什么颜色| 古惑仔是什么| C反应蛋白高是什么原因| 输氨基酸对身体有什么好处和坏处| 初心是什么| ln是什么| 紫苏有什么作用与功效| 筋膜炎吃什么药| 北洋军阀是什么意思| 胃溃疡吃什么中成药| 11点到12点是什么时辰| 吃槟榔有什么好处和坏处| 感恩节吃什么| 两胸中间疼是什么原因| 女人最大的底气是什么| 汪字五行属什么| 孩子说话晚是什么原因| 为什么睡觉会打呼噜| 哥哥的孩子叫什么| 聚首一堂是指什么生肖| 主食是什么意思| 烟青色是什么颜色| 奶昔是什么| 铁是什么颜色| 盍是什么意思| 腰椎疼挂什么科| 不将就什么意思| 焦糖色上衣配什么颜色裤子| 阴虚是什么意思| 女人长胡子是什么原因| 2014属什么生肖| 生性凉薄是什么意思| 肝功十二项包括什么| 目加一笔是什么字| 错综复杂是什么意思| 智五行属什么| 舌头尖有小红点这是什么症状| 什么叫反式脂肪| av是什么意思| 硬不起来吃什么药| 嘴巴干是什么原因| 胡麻是什么| 面部提升紧致做什么效果最好| 低血压适合吃什么食物| 老年人便秘吃什么好| mmf是什么药| 身上遇热就痒是什么病| 10mg是什么意思| 老实忠厚是什么生肖| 朋友是什么| 冲牛煞西是什么意思| 顽固不化是什么意思| 大心脏是什么意思| 阿达是什么意思| 颈椎不舒服挂什么科| 喉咙疼吃什么| 羊水是什么| 屁股疼挂什么科室| 百度
Skip to main content

呼和浩特机场旅客吞吐量再创新高

百度 (渐修)

You can create a ruleset to target multiple repositories in your organization.

Who can use this feature?

Organization owners can create rulesets at the organization level.

Introduction

For customers on GitHub Team or GitHub Enterprise plans you can create rulesets in your organization to control how users can interact with repositories in your organization. You can control things like who can push commits to a certain branch and how the commits must be formatted, or who can delete or rename a tag. You can also prevent people from renaming repositories.

You can also create push rulesets to block pushes to a private or internal repository and the repository's entire fork network. Push rulesets allow you to block pushes based on file extensions, file path lengths, file and folder paths, and file sizes.

Forks do not inherit branch or tag rulesets from their upstream repositories. However, forks owned by your organization are subject to the rulesets you create, like any other repository.

Forks do inherit push rulesets from their root repository. Push rules apply to the entire fork network for a repository, ensuring every entry point to the repository is protected. For example, if you fork a repository that has push rulesets enabled, the same push rulesets will also apply to your forked repository.

For a forked repository, the only people who have bypass permissions for a push rule are the people who have bypass permissions in the root repository.

Importing prebuilt rulesets

To import one of the prebuilt rulesets by GitHub, see github/ruleset-recipes.

You can import an existing ruleset using a JSON file. This can be useful if you want to apply the same ruleset to multiple repositories or organizations. For more information, see Managing rulesets for repositories in your organization.

Using fnmatch syntax

You can use fnmatch syntax to define patterns to target when you create a ruleset.

You can use the * wildcard to match any string of characters. Because GitHub uses the File::FNM_PATHNAME flag for the File.fnmatch syntax, the * wildcard does not match directory separators (/). For example, qa/* will match all branches beginning with qa/ and containing a single slash, but will not match qa/foo/bar. You can include any number of slashes after qa with qa/**/*, which would match, for example, qa/foo/bar/foobar/hello-world. You can also extend the qa string with qa**/**/* to make the rule more inclusive.

For more information about syntax options, see the fnmatch documentation.

Using ruleset enforcement statuses

While creating or editing your ruleset, you can use enforcement statuses to configure how your ruleset will be enforced.

You can select any of the following enforcement statuses for your ruleset.

  • Active: your ruleset will be enforced upon creation.
  • Disabled: your ruleset will not be enforced.

Creating a branch or tag ruleset

  1. In the upper-right corner of GitHub, click your profile picture, then click Your organizations.

  2. Next to the organization, click Settings.

  3. In the left sidebar, in the "Code, planning, and automation" section, click Repository, then click Rulesets.

    Screenshot of an organization's settings page. In the sidebar, a link labeled "Rulesets" is outlined in orange.

  4. Click New ruleset.

  5. To create a ruleset targeting branches, click New branch ruleset. Alternatively, to create a ruleset targeting tags, click New tag ruleset.

  6. Under "Ruleset name," type a name for the ruleset.

  7. Optionally, to change the default enforcement status, click Disabled and select an enforcement status. For more information about enforcement statuses, see About rulesets.

Choosing which repositories to target in your organization

With your ruleset, you can choose to target all repositories in your organization, repositories in your organization that match a certain naming convention, repositories in your organization that have custom properties, or a list of manually selected repositories in your organization.

For more information about custom properties, see Managing custom properties for repositories in your organization.

If a repository is targeted by a ruleset created at the organization level, only owners of the organization can edit the ruleset. However, people with admin access to the repository, or with a custom role including the "edit repository rules" permission, can create additional rulesets at the repository level. The rules in these rulesets will be aggregated with the rules defined at the organization level. The result is that creating a new ruleset can make the rules targeting a branch or tag more restrictive, but never less restrictive. For more information on creating rulesets, see About rulesets.

Targeting repositories by properties in your organization

You can target repositories in your organization by custom properties. See Managing custom properties for repositories in your organization.

  1. To target a dynamic list of repositories in your organization by properties, in the "Target repositories" section, next to "Repository targeting criteria" select Repositories matching a filter.
  2. To add a target, in the filter section, enter a query for example, visibility:private props.team:infra -language:java or Select by filter.
  3. In the modal dialog that appears, select custom or system properties from the dropdown menu, then select a value for each property.
  4. Click Apply.

Targeting all repositories in your organization

To target all repositories in your organization, in the "Target repositories" section, next to "Repository targeting criteria", select All repositories.

Targeting select repositories in your organization

  1. To target a static, manually selected list of repositories in your organization, in the "Target repositories" section, next to "Repository targeting criteria", select Only selected repositories.
  2. To select repositories to target, in the "Targeting criteria" section, select Select repositories, then search for the name of each repository you would like to target. Select each repository from the search results.

Targeting repositories by naming convention in your organization

  1. To target a dynamic list of repositories in your organization by naming convention, in the "Target repositories" section, next to "Repository targeting criteria", select Repositories matching a name.

  2. To begin defining a targeting pattern, in the "Targeting criteria" section, select Add a target , then click Include by pattern or Exclude by pattern.

  3. In the modal dialog that appears, enter a repository naming pattern using fnmatch syntax, then click Add Inclusion pattern or Add Exclusion pattern. For more information on fnmatch syntax, see Using fnmatch syntax.

    Note

    You can add multiple targeting criteria to the same ruleset. For example, you could include any repositories matching the pattern *cat*, then specifically exclude a repository matching the pattern not-a-cat.

  4. Optionally, on the ruleset configuration page, select Prevent renaming of target repositories.

Choosing which branches or tags to target

To target branches or tags, in the "Target branches" or "Target tags" section, select Add a target, then select how you want to include or exclude branches or tags. You can use fnmatch syntax to include or exclude branches or tags based on a pattern. For more information, see Using fnmatch syntax.

You can add multiple targeting criteria to the same ruleset. For example, you could include the default branch, include any branches matching the pattern *feature*, and then specifically exclude a branch matching the pattern not-a-feature.

Selecting branch or tag protections

In the "Branch protections" or "Tag protections" section, select the rules you want to include in the ruleset. When you select a rule, you may be able to enter additional settings for the rule. For more information on the rules, see Available rules for rulesets.

Note

If you select Require status checks before merging, in the "Additional settings" section:

  • You can enter the name of each status check you would like to require. To finish adding the status check as a requirement, you must click .
  • If you select Require branches to be up to date before merging, you must define a check for the protection to take effect.

Finalizing your branch or tag ruleset and next steps

To finish creating your ruleset, click Create. If the enforcement status of the ruleset is set to "Active", the ruleset takes effect immediately.

Creating a push ruleset

Note

This ruleset will enforce push restrictions for a repository's entire fork network.

You can create a push ruleset for private or internal repositories in your organization.

  1. In the upper-right corner of GitHub, click your profile picture, then click Your organizations.

  2. Next to the organization, click Settings.

  3. In the left sidebar, in the "Code, planning, and automation" section, click Repository, then click Rulesets.

    Screenshot of an organization's settings page. In the sidebar, a link labeled "Rulesets" is outlined in orange.

  4. Click New ruleset.

  5. To create a ruleset targeting branches, click New push ruleset.

  6. Under "Ruleset name," type a name for the ruleset.

  7. Optionally, to change the default enforcement status, click Disabled and select an enforcement status. For more information about enforcement statuses, see About rulesets.

Granting bypass permissions for your push ruleset

Note

Bypass permissions for push rulesets that target a repository will be inherited by the entire fork network for this repository. This means that the only users who can bypass this ruleset for any repository in this repository's entire fork network are the users who can bypass this ruleset in the root repository.

You can grant certain roles, teams, or apps bypass permissions for your ruleset. The following are eligible for bypass access:

  • Repository admins, organization owners, and enterprise owners
  • The maintain or write role, or custom repository roles based on the write role
  • Teams, excluding secret teams. See About teams.
  • GitHub Apps
  • Dependabot. For more information about Dependabot, see Dependabot quickstart guide.
  1. To grant bypass permissions for the ruleset, in the "Bypass list" section, click Add bypass.
  2. In the "Add bypass" modal dialog that appears, search for the role, team, or app you would like to grant bypass permissions, then select the role, team, or app from the "Suggestions" section and click Add Selected.

Choosing which repositories to target in your organization

With your ruleset, you can choose to target all repositories in your organization, repositories in your organization that match a certain naming convention, repositories in your organization that have custom properties, or a list of manually selected repositories in your organization.

For more information about custom properties, see Managing custom properties for repositories in your organization.

If a repository is targeted by a ruleset created at the organization level, only owners of the organization can edit the ruleset. However, people with admin access to the repository, or with a custom role including the "edit repository rules" permission, can create additional rulesets at the repository level. The rules in these rulesets will be aggregated with the rules defined at the organization level. The result is that creating a new ruleset can make the rules targeting a branch or tag more restrictive, but never less restrictive. For more information on creating rulesets, see About rulesets.

Targeting repositories by properties in your organization

You can target repositories in your organization by custom properties. See Managing custom properties for repositories in your organization.

  1. To target a dynamic list of repositories in your organization by properties, in the "Target repositories" section, next to "Repository targeting criteria" select Repositories matching a filter.
  2. To add a target, in the filter section, enter a query for example, visibility:private props.team:infra -language:java or Select by filter.
  3. In the modal dialog that appears, select custom or system properties from the dropdown menu, then select a value for each property.
  4. Click Apply.

Targeting all repositories in your organization

To target all repositories in your organization, in the "Target repositories" section, next to "Repository targeting criteria", select All repositories.

Targeting select repositories in your organization

  1. To target a static, manually selected list of repositories in your organization, in the "Target repositories" section, next to "Repository targeting criteria", select Only selected repositories.
  2. To select repositories to target, in the "Targeting criteria" section, select Select repositories, then search for the name of each repository you would like to target. Select each repository from the search results.

Targeting repositories by naming convention in your organization

  1. To target a dynamic list of repositories in your organization by naming convention, in the "Target repositories" section, next to "Repository targeting criteria", select Repositories matching a name.

  2. To begin defining a targeting pattern, in the "Targeting criteria" section, select Add a target , then click Include by pattern or Exclude by pattern.

  3. In the modal dialog that appears, enter a repository naming pattern using fnmatch syntax, then click Add Inclusion pattern or Add Exclusion pattern. For more information on fnmatch syntax, see Using fnmatch syntax.

    Note

    You can add multiple targeting criteria to the same ruleset. For example, you could include any repositories matching the pattern *cat*, then specifically exclude a repository matching the pattern not-a-cat.

  4. Optionally, on the ruleset configuration page, select Prevent renaming of target repositories.

Selecting push protections

You can block pushes to this repository and this repository's entire fork network based on file extensions, file path lengths, file and folder paths, and file sizes.

Any push protections you configure will block pushes in this repository and throughout this repository's entire fork network.

  1. Under "Push protections," click the restrictions you want to apply. Then fill in the details for the restrictions you select.

    For file path restrictions, you can use partial or full paths. You can use fnmatch syntax for this. For example, a restriction targeting test/demo/**/* prevents any pushes to files or folders in the test/demo/ directory. A restriction targeting test/docs/pushrules.md prevents pushes specifically to the pushrules.md file in the test/docs/ directory. For more information, see Creating rulesets for a repository.

Finalizing your push ruleset and next steps

To finish creating your ruleset, click Create. If the enforcement status of the ruleset is set to "Active", the ruleset takes effect immediately.

怀孕了不想要最好的办法是什么 肝结节是什么病严重吗 新生儿拉稀是什么原因 男人脖子后面有痣代表什么 什么是无精症
礼金是什么意思 港式按摩是什么意思 腐生是什么意思 科班出身是什么意思 脑白质病是什么病
米酒发酸是什么原因 adh是什么 睫毛炎有什么症状 fossil是什么牌子 1953年属蛇的是什么命
眼带用什么方法消除 武将是什么生肖 芙蓉粉是什么颜色 傲娇什么意思 落荒而逃什么意思
什么样的男人值得托付终身adwl56.com 黄精是什么hcv9jop4ns7r.cn 想法是什么意思aiwuzhiyu.com 吃香菜有什么好处hcv8jop3ns3r.cn 肝吸虫病有什么症状hcv9jop2ns1r.cn
安徽有什么土特产sscsqa.com 带状疱疹能吃什么hcv9jop2ns3r.cn 男人是女人的什么hcv8jop8ns1r.cn 窦性心动过速什么意思hcv7jop9ns9r.cn 公粮是什么意思hcv7jop6ns6r.cn
谭咏麟属什么生肖hcv7jop4ns7r.cn 垂体泌乳素高是什么原因hebeidezhi.com 脚出汗用什么药hcv9jop7ns1r.cn 睡觉起来脸肿是什么原因引起的hcv8jop0ns1r.cn 开市是什么意思hcv8jop8ns5r.cn
什么一清二白hcv9jop2ns1r.cn 突然心跳加快是什么原因hcv8jop7ns7r.cn 漏是什么意思hcv7jop6ns5r.cn 锁阳有什么功效hcv9jop1ns1r.cn 冰爽丝是什么面料sanhestory.com
百度