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

chore(codeowners): change ownership of CircleCI config #3378

Merged
merged 1 commit into from
Nov 8, 2023

Conversation

loderunner
Copy link
Contributor

We are the Developer Experience team at CircleCI, and we develop the CircleCI VS Code extension and the CircleCI YAML language server.

Our users often use our software in conjunction with the Red Hat YAML extension for VS Code. This extension provides schema validation for many YAML file formats, based on the schemas in SchemaStore.

As a consequence, many of our users report errors to us errors with the schema in SchemaStore, whether it be mistakes in the schema, or simply our product deprecating or changing certain features, believing that the error comes from our extension.

When this happens, we often contribute to SchemaStore to provide our users with a smooth experience across products. However, the work cycle is less than optimal, as we need our contributions to go through a fork and a pull request.

Today, we wish to go one step further. We would like to share our updates to the SchemaStore community faster and in a more proactive manner. We wish to take ownership of the schema for CircleCI config files in the SchemaStore in order to ensure continuous updates and avoid desynchronization between our product and SchemaStore.

If this seems like a valid arrangement, could you please approve and merge this PR, and grant write privileges to the CircleCI-Public/developer-experience team?

Thank you!

@github-actions github-actions bot added the ci ".github/**/*" folder is updated (auto-generated by labeler action) label Nov 8, 2023
@madskristensen madskristensen merged commit cdeddc1 into SchemaStore:master Nov 8, 2023
3 checks passed
@madskristensen
Copy link
Contributor

Thanks

@loderunner
Copy link
Contributor Author

Thanks for accepting and merging this Pull Request.

Today, we opened a new pull request on the CircleCI Schema file (#3417). As code owners, we were hoping to review and merge these changes ourselves. Unfortunately, we are not fully code owners yet.

Screenshot 2023-11-30 at 14 18 11

According to the errors report on the CODEOWNERS file:

Unknown owner on line 18: make sure the team @CircleCI-Public/developer-experience exists, is publicly visible, and has write access to the repository

According to GitHub docs

The people you choose as code owners must have write permissions for the repository. When the code owner is a team, that team must be visible and it must have write permissions

We've ensured that our team @CircleCI-Public/developer-experience is publicly visible, all that is missing now is write permissions to the SchemaStore repo.

Would it be possible to be granted write permissions to this repo? Using the CODEOWNERS file and branch protection rules, it should be possible to limit our contributions to only the files related to CircleCI. I understand this is quite the ask, and that multiplying users with write permissions may not be secure. Let us know if this is possible.

@hyperupcall
Copy link
Member

hyperupcall commented Dec 20, 2023

Good with me, but it would really be up to @madskristensen (ping)

@hyperupcall
Copy link
Member

Another option, especially if we get multiple requests, is to use a bot like code-owner-self-merge. That would alleviate the security concerns while allowing autonomy.

@madskristensen
Copy link
Contributor

I like the code-owner-self-merge option the best. seems like it would solve the problem in a more scalable way

@hyperupcall
Copy link
Member

Sounds great, I'll be able to work on that sometime tomorrow

@hyperupcall
Copy link
Member

@loderunner @jvincent42 Users from the @CircleCI-Public/developer-experience group should now be able to merge! The bot worked for me in #3478, I opened #3479 for someone from the group to test it out

@hyperupcall
Copy link
Member

It looks like the bot's message does not ping the group, and there are no reviewers to the PR, so that might need to be fixed 🤔

@hyperupcall
Copy link
Member

hyperupcall commented Dec 23, 2023

While investigating, I stumbled across OSS-Docs-Tools/code-owner-self-merge#13, which mentions that support for organization teams is not implemented yet. This seems to be a requirement since CircleCI-Public/developer-experience is an organization team. There was a closed PR implementing that, so I forked the bot and added that code along with some other features. But, in my testing repository, the action kept failing due to some "Not Found" error. It fails on this (paraphrased) line:

const users = await octokit.paginate('GET /orgs/{org}/teams/{team_slug}/members', {
  org: 'bash-bastion',
  team_slug: 'cool-team'
})

The code needs to determine which people are members of the team, so it knows whether or not a commenter who says "LGTM" is authorized to merge the PR.

Debugging this, when I use the API on the command line, I also get inconsistent results. Quering my test team:

$ gh api -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" /orgs/bash-bastion/teams/cool-team/members
[
  {
    "login": "hyperupcall",
    "id": 24364012,
    "node_id": "MDQ6VXNlcjI0MzY0MDEy",
    ...
  }
]

But, using CircleCI's:

$ gh api -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" /orgs/CircleCI-Public/teams/developer-experience/members
{
gh: Not Found (HTTP 404)
  "message": "Not Found",
  "documentation_url": "https://docs.github.com/rest/teams/members#list-team-members"
}

This seems to suggest that CircleCI-Public/developer-experience and my test team, bash-bastion/cool-team are not publically visible. The weird thing is, is that the GitHub UI seems to suggest that bash-bastion/cool-team it is visible:

image

Is this the case for the CircleCI-Public/developer-experience team too? Any idea how to fix that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci ".github/**/*" folder is updated (auto-generated by labeler action)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants