mw是什么意思| 轻度抑郁症吃什么药| 月经期肚子疼是什么原因| 7.17什么星座| 封闭针是什么| mra是什么药| 吃什么补气虚最快最好| 工字可以加什么偏旁| 小叶增生是什么原因导致的| 吃什么补记忆力最快| 魔性是什么意思| 现在最火的歌是什么| 胃胀胃不舒服吃什么药| 中国的国花是什么花| 闲情雅致是什么意思| 喉咙痛吃什么药好得最快| 长方形纸可以折什么| 腔隙性脑梗死吃什么药| 外阴瘙痒用什么洗液| 支原体感染用什么药| 堂妹是什么关系| 胎儿胆囊偏小有什么影响| 王字旁的字跟什么有关| 心肌酶是检查什么的| 屁多肚子胀是什么原因| 距离感是什么意思| 什么终于什么造句| au是什么意思| c8是什么意思| 女王是什么意思| 过敏性咳嗽用什么药效果好| 输尿管结石挂什么科| 耿耿于怀是什么意思| 咬牙切齿什么意思| 知了是什么动物| 云为什么是白色的| 匹维溴铵片治什么病| 月经发黑是什么原因| lh是什么激素| 治痛风吃什么药| 梦见走亲戚是什么意思| 小苏打和柠檬酸反应产生什么| 中药什么时间喝效果最好| 去皱纹用什么方法最好和最快| 旧人是什么意思| 毛巾为什么会臭| 什么的口罩| 仄怎么读什么意思| 为什么会气血不足| 七叶子是什么意思| 拔了牙可以吃什么| 梦到牙齿掉了是什么意思| 6月25号是什么星座| 蒙古族的那达慕大会是在什么时候| 枕头底下放剪刀有什么说法| 银行降息意味着什么| xxoo是什么意思| 什么的草原| 外阴病变有什么症状| 满月是什么意思| 不可开交是什么意思| 21岁属什么生肖| 牙槽骨吸收是什么意思| 公分是什么意思| 12岁属什么| 7月15日是什么节| 2001年属蛇的是什么命| 待业什么意思| 天秤座什么象星座| 属鸡是什么命| 什么样的眼睛形容词| 6月20日是什么星座| 甲状腺滤泡性肿瘤是什么意思| 检查前列腺需要做什么检查| bpa是什么| 铁瓷是什么意思| 如履薄冰什么意思| 西安有什么山| 27属相是什么生肖| 越睡越困是什么原因| 狗为什么不能吃洋葱| 县长什么级别| 排卵期同房要注意什么| 性交是什么感觉| 为什么喉咙总感觉有东西堵着| 肺有问题挂什么科| 六十天打一字是什么字| 复原乳是什么意思| 什么品牌的母婴用品好| 吝啬鬼是什么生肖| 脖子凉是什么原因| 脑震荡有什么症状| 脑利钠肽前体值高预示什么| 1975年是什么年| 角头是什么意思| 手为什么会掉皮| 什么是雷达| moco是什么牌子| prc什么意思| 6.27什么星座| 犯了痔疮为什么老放屁| 梨子和什么一起榨汁好喝| navy是什么颜色| 蓝牙耳机什么样的好| 蛋白粉什么时候喝| pu是什么元素| 酸橙绿是什么颜色| 18k金是什么意思| 还愿有什么讲究| 阴道有褐色分泌物是什么原因| 血糖低吃什么药| 眼下长斑是什么原因| 猫发出咕噜咕噜的声音是什么意思| 军字五行属什么| 蔬菜有什么| 季字五行属什么| 蛇缠腰用什么药| 咕咚是什么| 唐僧属什么生肖| 土色是什么颜色的图片| 川崎病有什么症状| 龙头烤是什么鱼| 罗红霉素胶囊治什么病| 异想天开是什么意思| 高铁座位为什么没有e座| 女性什么时候退休| 什么水晶招财| 真命题是什么意思| 12580是什么号码| 糖尿病的症状是什么| 狗吃什么食物| 心脏做造影是什么意思| 骨头咔咔响是什么原因| 醉代表什么生肖| 痛经吃什么水果| 泌乳素是什么意思| 小儿肠胃炎吃什么药| 勿忘是什么意思| 什么地赶来| 男人梦见蛇是什么预兆| 开水烫了用什么紧急处理| 头疼头晕吃什么药| 什么微风| 鸽子咳嗽吃什么药最好| 体外射精是什么| 胸推是什么| 葡萄什么季节成熟| 财星是什么意思| 孕妇什么体质容易晚生| 老舍原名是什么| 单三是什么| 什么人什么目| 吃猪肺有什么好处和坏处| 左胸口疼是什么原因| 眉毛长长是什么原因| 乳酸菌可以制作什么| 杨枝甘露是什么| 晨尿有泡沫是什么原因| 为什么减肥不建议喝粥| 苹能组什么词| 荼什么意思| 头疼可以吃什么药| 司局级是什么级别| 褪黑素有什么作用| 5月29日什么星座| 吃白糖有什么好处和坏处| 酉时是什么时候| 什么是用户名| 石榴石是什么材质| 鸡粉是什么| 甲状腺结节什么东西不能吃| 阿拉蕾什么意思| 上午8点是什么时辰| 12月11日是什么星座| 什么时候不能喷芸苔素| 什么药治咳嗽最好| becky是什么意思| 今年十八岁属什么生肖| 纯天然无公害什么意思| 面瘫是什么引起的| ket是什么| 脱节是什么意思| 为什么广西女孩子好娶| 尿路感染吃什么药效果最好| 猪肝补什么功效与作用| 芊芊学子是什么意思| 脾虚是什么原因导致的| 栀子花开有什么寓意| 甲沟炎看什么科| 草是什么意思| 长期吃阿司匹林有什么副作用| 什么牌子的空调最好| 松弛是什么意思| 为什么打嗝不停| 保险费率是什么| 印是什么意思| 对别人竖中指是什么意思| 吃什么治疗湿气重| ich是什么意思| 脑梗输什么液效果最好| 脚底痛挂什么科| 黑白颠倒是什么意思| pinsp呼吸机代表什么| 上皮细胞是什么| 鲁迅字什么| 科学家是干什么的| 痔疮长什么样子图片| 胆经不通吃什么中成药| 什么是老年斑图片| 什么东西嘴里没有舌头| 尿蛋白高是什么病| 肝内钙化斑是什么意思| 因加一笔是什么字| 匀字五行属什么| 胎盘位于前壁是什么意思| 闻鸡起舞是什么意思| 杨梅酒有什么功效| 甲状腺是什么症状表现| 荧光剂是什么东西| 严密是什么意思| 腿没有劲是什么原因| 粉丝炒什么好吃| 一个黑一个今念什么| 2月8日什么星座| 扶阳是什么意思| 昙花一现是什么生肖| 蒸馒头用什么面粉| 孕期腰疼是什么原因| nba什么时候开始| 历程是什么意思| 胎盘老化是什么原因造成的| 1978属什么| 腮腺炎反复发作是什么原因| 用维生素e擦脸有什么好处和坏处| 金秘书为什么那样| gala是什么意思| 第一次见面送女生什么花| 水的ph值是什么意思| 拉倒吧是什么意思| 临床医学主要学什么| 头皮屑特别多是什么原因| 肠炎是什么原因引起的| 去冰和常温有什么区别| aldo是什么牌子| 马铃薯什么时候传入中国| 什么叫子宫肌瘤| 什么是菜花状疣图片| 夜未央是什么意思| 月经期间头疼是什么原因| 5月24日什么星座| 取环后月经量少是什么原因| 骨髓不造血是什么病| 柠檬水喝了有什么好处| ex是什么意思| 早泄吃什么| 意面是什么做的| hpv和tct有什么区别| 带银子发黑是什么原因| 天仙是什么意思| 小便有点刺痛是什么原因引起的| 环切是什么意思| 骨穿是检查什么的| 尿蛋白是什么| 肛门周围痒是什么原因| 百度
Skip to content

github/cleanowners

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Cleanowners action

CodeQL Lint Code Base Python package Docker Image CIOpenSSF Scorecard

Cleanowners is a GitHub Action that is designed to help keep CODEOWNERS files current by removing users that are no longer a part of the organization. This is helpful for companies that are looking to remove outdated information in the CODEOWNERS file. This action can be paired with other CODEOWNERS related actions to suggest new owners or lint CODEOWNERS files to ensure accuracy.

This action was developed by the GitHub OSPO for our own use and developed in a way that we could open source it that it might be useful to you as well! If you want to know more about how we use it, reach out in an issue in this repository.

Support

If you need support using this project or have questions about it, please open up an issue in this repository. Requests made directly to GitHub staff or support team will be redirected here to open an issue. GitHub SLA's and support/services contracts do not apply to this repository.

OSPO GitHub Actions as a Whole

All feedback regarding our GitHub Actions, as a whole, should be communicated through issues on our github-ospo repository.

Use as a GitHub Action

  1. Create a repository to host this GitHub Action or select an existing repository.
  2. Select a best fit workflow file from the examples below.
  3. Copy that example into your repository (from step 1) and into the proper directory for GitHub Actions: .github/workflows/ directory with the file extension .yml (ie. .github/workflows/cleanowners.yml)
  4. Edit the values (ORGANIZATION, EXEMPT_REPOS) from the sample workflow with your information.
  5. Also edit the value for GH_ENTERPRISE_URL if you are using a GitHub Server and not using github.com. For github.com users, don't put anything in here.
  6. Update the value of GH_TOKEN. Do this by creating a GitHub API token with permissions to read the repository/organization and write issues or pull requests. Then take the value of the API token you just created, and create a repository secret where the name of the secret is GH_TOKEN and the value of the secret the API token. It just needs to match between when you create the secret name and when you refer to it in the workflow file.
  7. Commit the workflow file to the default branch (often master or main)
  8. Wait for the action to trigger based on the schedule entry or manually trigger the workflow as shown in the documentation.

Configuration

Below are the allowed configuration options:

Authentication

This action can be configured to authenticate with GitHub App Installation or Personal Access Token (PAT). If all configuration options are provided, the GitHub App Installation configuration has precedence. You can choose one of the following methods to authenticate:

GitHub App Installation
field required default description
GH_APP_ID True "" GitHub Application ID. See documentation for more details.
GH_APP_INSTALLATION_ID True "" GitHub Application Installation ID. See documentation for more details.
GH_APP_PRIVATE_KEY True "" GitHub Application Private Key. See documentation for more details.
GITHUB_APP_ENTERPRISE_ONLY False false Set this input to true if your app is created in GHE and communicates with GHE.
Personal Access Token (PAT)
field required default description
GH_TOKEN True "" The GitHub Token used to scan the repository. Must have read access to all repository you are interested in scanning.

Other Configuration Options

field required default description
GH_ENTERPRISE_URL False "" The GH_ENTERPRISE_URL is used to connect to an enterprise server instance of GitHub. github.com users should not enter anything here.
ORGANIZATION Required to have ORGANIZATION or REPOSITORY The name of the GitHub organization which you want this action to work from. ie. github.com/github would be github
REPOSITORY Required to have ORGANIZATION or REPOSITORY The name of the repository and organization which you want this action to work from. ie. github/cleanowners or a comma separated list of multiple repositories github/cleanowners,super-linter/super-linter
EXEMPT_REPOS False "" These repositories will be exempt from this action. ex: If my org is set to github then I might want to exempt a few of the repos but get the rest by setting EXEMPT_REPOS to github/cleanowners,github/contributors
DRY_RUN False False If set to true, this action will not create any pull requests. It will only log the repositories that could have the CODEOWNERS file updated. This is useful for testing or discovering the scope of this issue in your organization.
ISSUE_REPORT False False If set to true, this action will create an issue in the repository with the report on the repositories that had users removed from the CODEOWNERS file.

Example workflows

Basic

---
name: Weekly codeowners cleanup
on:
  workflow_dispatch:
  schedule:
    - cron: "3 2 1 * *"

permissions:
  contents: read

jobs:
  cleanowners:
    name: cleanowners
    runs-on: ubuntu-latest
    permissions:
      issues: write

    steps:
      - name: Run cleanowners action
        uses: github/cleanowners@v1
        env:
          GH_TOKEN: ${{ secrets.GH_TOKEN }}
          ORGANIZATION: <YOUR_ORGANIZATION_GOES_HERE>

Advanced

---
name: Weekly codeowners cleanup
on:
  workflow_dispatch:
  schedule:
    - cron: "3 2 1 * *"

permissions:
  contents: read

jobs:
  cleanowners:
    name: cleanowners
    runs-on: ubuntu-latest
    permissions:
      issues: write

    steps:
      - name: Run cleanowners action
        uses: github/cleanowners@v1
        env:
          GH_TOKEN: ${{ secrets.GH_TOKEN }}
          ORGANIZATION: <YOUR_ORGANIZATION_GOES_HERE>
          EXEMPT_REPOS: "org_name/repo_name_1, org_name/repo_name_2"
          ISSUE_REPORT: true
      - name: Create issue
        uses: peter-evans/create-issue-from-file@v5
        with:
          title: Cleanowners Report
          content-filepath: ./report.md
          assignees: <YOUR_GITHUB_HANDLE_HERE>
          token: ${{ secrets.GITHUB_TOKEN }}

Authenticating with a GitHub App and Installation

You can authenticate as a GitHub App Installation by providing additional environment variables. If GH_TOKEN is set alongside these GitHub App Installation variables, the GH_TOKEN will be ignored and not used.

---
name: Weekly codeowners cleanup via GitHub App
on:
  workflow_dispatch:
  schedule:
    - cron: "3 2 1 * *"

permissions:
  contents: read

jobs:
  cleanowners:
    name: cleanowners
    runs-on: ubuntu-latest
    permissions:
      issues: write

    steps:
      - name: Run cleanowners action
        uses: github/cleanowners@v1
        env:
          GH_APP_ID: ${{ secrets.GH_APP_ID }}
          GH_APP_INSTALLATION_ID: ${{ secrets.GH_APP_INSTALLATION_ID }}
          GH_APP_PRIVATE_KEY: ${{ secrets.GH_APP_PRIVATE_KEY }}
          ORGANIZATION: <YOUR_ORGANIZATION_GOES_HERE>
          EXEMPT_REPOS: "org_name/repo_name_1, org_name/repo_name_2"

Local usage without Docker

  1. Make sure you have at least Python3.11 installed
  2. Copy .env-example to .env
  3. Fill out the .env file with a token from a user that has access to the organization (listed below). Tokens should have at least write:org and write:repository access.
  4. Fill out the .env file with the configuration parameters you want to use
  5. pip3 install -r requirements.txt
  6. Run python3 ./cleanowners.py, which will output everything in the terminal

License

MIT

More OSPO Tools

Looking for more resources for your open source program office (OSPO)? Check out the github-ospo repository for a variety of tools designed to support your needs.

About

A GitHub Action to suggest removal of non-organization members from CODEOWNERS files

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors 5

af是什么 周瑜为什么打黄盖 淡淡的什么 医生助理是做什么的 227什么意思
皮肤发痒用什么药 窈窕淑女是什么生肖 cp是什么的缩写 胆切除后吃什么好 阴茎勃起不硬吃什么
神经系统是由什么组成的 小便短赤什么意思 化疗后恶心呕吐吃什么可以缓解 胃不好吃什么水果最好 势不可挡是什么意思
大学什么时候开始收费 什么是精神分裂症 蚊香对人体有什么危害 脚底冰凉是什么原因 三个鬼是什么字
张家界为什么叫张家界hcv7jop9ns1r.cn 二拇指比大拇指长代表什么hcv8jop0ns1r.cn 长脸型适合什么样的发型hcv8jop5ns9r.cn 阴山是今天的什么地方hcv7jop7ns4r.cn 跳楼机是什么hcv8jop8ns6r.cn
1030是什么星座hcv7jop4ns8r.cn 泡泡是什么意思wzqsfys.com 五月七日是什么星座hcv9jop0ns6r.cn 香港特首什么级别hcv7jop6ns9r.cn 看到刺猬有什么预兆hcv7jop5ns1r.cn
做彩超为什么要憋尿hcv8jop3ns6r.cn 双绉是什么面料hcv9jop4ns6r.cn 卡介苗预防什么病hcv9jop8ns0r.cn 湫是什么意思hcv9jop2ns3r.cn 四十岁月经量少是什么原因hcv9jop5ns4r.cn
后脑两侧痛是什么原因hcv9jop6ns9r.cn fossil是什么牌子hcv9jop8ns2r.cn 鼹鼠是什么动物hcv8jop8ns2r.cn 女性尿路感染吃什么药效果好hcv9jop2ns9r.cn 遥字五行属什么hcv9jop3ns2r.cn
百度