Git Product home page Git Product logo

ash-nazg's Introduction

Repository Manager (Ash-Nazg)

One interface to find all group contributors and in Intellectual Property Rights (IPR) bind them.

This tool was created to support contributions made to a group, under the form of pull requests, in order to assess whether they are IPR-OK or not. It still has some rough edges but hopefully it can be usable enough to get started, and perfected over time.

The tool is at currently in my labs hatchery, but hopefully at some point some kind soul will place it at a more memorable URL.

When you get there, you will be asked to log in through GitHub. You can't do much without that, because most of the actions you can undertake through the tool (or that the tool can undertake on your behalf when reacting to a GitHub event) require authorised access to GitHub. The permissions it requires are rather broad; that is because it is difficult to be granular with GitHub permissions. The tool isn't doing anything unholy.

Once you log in your user will be created; if you need to be an admin just ask someone to give you that flag from the "Edit User" page. Note: there are currently two distinct login flows. Some features such as create and import repositories do not appear unless you sign in via the second link.

If you need to deploy or to hack on this tool, you will want to read the Development Guide

Common Tool

This is basically what people should use when they want to start a new specification with the WG/CG. It gives you a choice of the organizations under which you are allowed to create a new repo (including your own user), and you can pick the name of the repo and the groups to which it belongs.

Note: the list of organizations depends on the user's GitHub organizations. If you are owner of an organization and you don't see it in the list, you need to grant the repository manager access to that organization. To do so, go in your 'Authorized OAuth Apps' settings`, click on 'W3C Repository Manager' and grant access to the new organization.

Hitting "Create" can take a little while as the tool does all of the following, live:

  • Creates the repo on GitHub
  • Adds several files, notably the LICENSE.md and CONTRIBUTE.md, a w3c.json file which can be used by other tools, and an index.html that's a bare-bones ReSpec spec ready to be edited.
  • Adds a hook to the repo such that pull requests and comments on them are sent to us, including one distinct cryptographic secret per repo.
  • Saves all the relevant info on our side.

Most users should only ever have to use that. Once done they can go and play in their repo.

Important: w3cbot should be able to comment on the different pull requests so you should consider adding @w3cbot as a member of the organization.

This is the same as "New" but for an existing repo. It will never overwrite something there so it is the user's responsibility to check that the repo is okay once imported.

Logout

This should be obvious. If it isn't, please don't use the application.

How Pull Requests Get Handled

Whenever a pull request is made against a repo that is under the tool's management, we get notified. We use this information to assess if the PR is acceptable (i.e. has all its contributors in at least one of the groups that the repo belongs to).

Count as contributors not just the person making the pull request, but also anyone added either in the PR description or in any subsequent comment using "+@username" on a line on its own. If a contributor was added by mistake, she can be removed with "-@username" on a line on its own. This includes the person making the PR. Thanks to that, you can issue a PR completely on behalf of someone else.

Every time a PR is created or has a comment with a username change, the status of the PR is changed. If it's acceptable it'll get changed to green with a note indicating that it's fine; if not it gets changed to some ugly brown with a red cross (and a link that people can use to check the issue in more detail).

Admin Tools

Currently Open Pull Requests

This list all PRs that are now open, even old ones. It lists useful details such as which users are being problematic either because they are unknown (not in the system at all) or outside (known to the system but not in one of the right groups for that repo).

You can go to PR details by clicking "Details".

PR Details

If the PR is not in an acceptable state, this will list problematic users with a link to fix them each. The fix can either be "Add to system" or "Edit" (details below).

The idea is that the vast majority of non-acceptable PRs in the first few weeks will come from people who are simply not known, but that relatively quickly it ought to become a less frequent occurrence.

If it so happens that all of the problematic users can be added to the system or to the right group, and that you have done so, then you can return to the PR details page and hit "Revalidate". We could revalidate every time a user is added or edited, but it's pretty costly so for the time being it is done this way. Revalidation will of course update both the local state and the PR's mergability indicator on GitHub.

Add User to system

For users that are unknown to the system, they can be added by following on of those links and just clicking that button. This is always an innocuous operation; it does not give the user any special rights nor can it make a PR OK (since the user needs to be in a group for that).

Active Last Week PRs

This is a list of pull requests, in any state, that saw activity last week. They can be filtered according to the affiliation of the companies that made the contributions. This is essentially so that AC reps who have people in CGs who are only supposed to contribute to some specific work but not all of it can monitor what's been going on and avail themselves of their 45 days retraction window. Similar affordances are available as for the list of open PRs.

Edit User

The interface to edit users is where the W3C data model and the GitHub data model get to meet. This alone is scary; I've tried to make it less scary.

A list of the groups known to the system is shown, the user can be added and removed from them there. If the user's affiliation is unset, once some groups have been added you can click "Set". This will load up a list that is the intersection of membership in the selected groups. The UI will also try to select the user with the name matching their GitHub profile (which may not always work, but often does). Hitting "OK" will associate the GH user with the W3C user, making it possible for us to use affiliation information. Don't forget to hit "Save".

This is a little convoluted but it's the best I could do with the current APIs from both GitHub and the W3C backend. Hopefully it can be simplified in the future.

Admin > Users

This is a list of users. Things you can do there include making them admins and giving them blanket contribution rights. USE EITHER WITH CARE.

Admins should normally not be able to break the system, but they can enter all sorts of bogus information that would be really annoying. Only grant admin when you're sure; it's probably better to ask others first.

Blanket is a different type of superpower: users with blanket access are considered acceptable contributors to ALL repos, irrespective of their group memberships. This should normally be restricted to W3C team people.

Admin > Groups

This is a list of all W3C groups. You will note that most have an "Add" button next to them: those are the ones that are in W3C but not in this system. Please do not start adding groups unless they explicitly want to be managed under this system. We only want people to create/import repos for groups that are actually using this system. Clicking "Add" makes that group one of those available for repos and users to belong to, adding too many will make those dialogs unwieldy.

Share & Enjoy!

ash-nazg's People

Contributors

christianliebel avatar darobin avatar deniak avatar dependabot[bot] avatar dontcallmedom avatar guest271314 avatar jsoref avatar plehegar avatar tabatkins avatar tripu avatar ugultopu avatar vivienlacourba avatar wseltzer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ash-nazg's Issues

Allow to associate a github account without group's participation

Now that the affiliation and participations of an account are checked live (per #56), it is no longer necessary or useful to associate a github account with a group; instead, edit user should offer to link the account to a w3c one either via the login, the id or some other sort of magic (email address? link to github account?)

Right now, the W3C API probably doesn't allow this though.

Contact in w3c.json should be configurable

When importing a repo, the current contact in the w3c.json is the person that imported the repo (I think - it's always my user name. Could also be hardcoded :D)

It'd be great to have some UI that enables determining the contact at import time.

Keep track of affiliation/participation changes

When someone's affiliation changes, or when their participation to a group changes, the PR validation needs to take it into account.

This could be done in two ways:

  • either, always check at PR validation time the current status of a given contributor (right now, it is only done when the contributor is added to the system)
  • or rely on a hook from the W3C API to update the database-cached information on a contributor

Allow to un-manage a repository

Due to the bug #4 , I ended up importing repos from my own account (forks of the right repos) in ash-nazg, which I would prefer to remove from the list of managed repositories; I haven't found a way to do that in the current UI.

Error when trying to import a repo

I'm trying to import the feature-policy repo into the WICG, and the repo-manager (silently) fails to do so.
Looking at the console, I see app.js:3 Uncaught TypeError: o.default.findDOMNode is not a function

@dontcallmedom - can you please take a look? Thanks in advance! :)

[usability] link from ash-nazg home page to pages about how and why you're supposed to use it

Problem: If I web search for site:w3.org ash-nazg, I am able to find the https://labs.w3.org/hatchery/repo-manager/ home page, however, it has a bit of a random unofficial "labs.w3" look and feel, with no context for how or why you're supposed to use it.

Presumably this is documented somewhere already (or should be).

Could the https://labs.w3.org/hatchery/repo-manager/ home page explicitly link to how and why you're supposed to use it?

Thanks!

Way to setup default CG/org

Would've been nice if there was a way to setup a default CG and/or org when importing a repo, as to minimize the number of clicks during the import process.

Bug in repo import form

I was trying to import several WebRTC/DAP repos in a row using https://labs.w3.org/hatchery/ash-nazg/repo/import and hit the following bugs:

  • after having imported the first repo, the account selector (which was set on "w3c") reverted to my own account ("dontcallmedom"), and didn't let me set it back to "w3c"
  • if you hit "import" without having selected a group, it reports an inscrutable JSON error; I guess the group selector should be marked "required"

It would also be nice if the input field for repos had an autocomplete on the known repos for the said account.

Improve contribution flow & documentation

  1. Be an active W3C member and contributor
  2. Submit a pull request, e.g. w3c/mediacapture-image#173
  3. Have 'ipr' trigger a failure with a details link requiring a login / and authorizing many permissions.

Expect:

  • Actionable summary of how to correctly register contributor status. And, ability to do so.

Actual:

  • Details are not provided, just a log in page with text that indicates significant permissions are required without justifying them.

This site is essentially an application built on top of GitHub. As such, in order for it to work, you need to log into it using your GitHub credentials.

Given that the actions we need to carry out are fairly extensive, the level of permissions we require is relatively high. Worry not, we promise to almost never use it for anything evil.

Go ahead and log in using GitHub.

  • Permissions requested by this app are overly broad, including read and write all public repository data.

Suggestion:

  • Explain in the details page what the IPR validation is.
  • Explain steps to correctly register.
  • Do not require overly broad account permissions to do so.

Users affiliations can vary per group

A given user can have different affiliations per group. The W3C systems already support the case where one is an invited expert in one WG, but represents their company in a CG (see #28).

Ideally, at some points, the W3C systems will also support an even more flexible approach where a user can have a different affiliation for any kind of group. If at all possible, ash-nazg should be built along that principle.

Can we rename this thing?

Can we please give "ash-nazg" a more obvious name? I can't ever remember what this thing is called and I tend to waste disproportionate amounts of time trying to find it.

Render components into specific element instead of <body>

React shows this error on the client's console:

Warning: render(): Rendering components directly into document.body is discouraged,
since its children are often manipulated by third-party scripts and browser extensions.
This may lead to subtle reconciliation issues.
Try rendering into a container element created for your app.

Fix that.

Force pushes are ignored

If I force-push to a PR's branch, the bot doesn't set any status for the new commit.
Perhaps the bot isn't listening for all the relevant GitHub events?

Review npm warnings

npm WARN deprecated [email protected]: Babel's CLI commands have been moved from the babel package to the babel-cli package
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN prefer global [email protected] should be installed with -g
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

"can't convert undefined to object" in "active last week" view

When trying to load https://labs.w3.org/hatchery/ash-nazg/pr/last-week, I get an error message stating "can't convert undefined to an object".

The console has the following stack trace:
13:49:42,359 TypeError: can't convert undefined to object
Trace de la pile :
[14]</v</<.value/t<@https://labs.w3.org/hatchery/ash-nazg/js/app.js:2:8333
[14]</v</<.value@https://labs.w3.org/hatchery/ash-nazg/js/app.js:2:7803
[103]</</w._renderValidatedComponentWithoutOwnerOrContext@https://labs.w3.org/hatchery/ash-nazg/js/app.js:7:2158
[103]</</w._renderValidatedComponent@https://labs.w3.org/hatchery/ash-nazg/js/app.js:7:2411
[141]</</r.measure/i@https://labs.w3.org/hatchery/ash-nazg/js/app.js:9:3382
[103]</</w._updateRenderedComponent@https://labs.w3.org/hatchery/ash-nazg/js/app.js:7:1632
[103]</</w._performComponentUpdate@https://labs.w3.org/hatchery/ash-nazg/js/app.js:7:1379
[103]</</w.updateComponent@https://labs.w3.org/hatchery/ash-nazg/js/app.js:7:700
[141]</</r.measure/i@https://labs.w3.org/hatchery/ash-nazg/js/app.js:9:3382
[103]</</w.performUpdateIfNecessary@https://labs.w3.org/hatchery/ash-nazg/js/app.js:6:31655
[147]</</i.performUpdateIfNecessary@https://labs.w3.org/hatchery/ash-nazg/js/app.js:9:9879
s@https://labs.w3.org/hatchery/ash-nazg/js/app.js:9:16820
[169]</</o.perform@https://labs.w3.org/hatchery/ash-nazg/js/app.js:10:2860
[169]</</o.perform@https://labs.w3.org/hatchery/ash-nazg/js/app.js:10:2860
[153]</</<.perform@https://labs.w3.org/hatchery/ash-nazg/js/app.js:9:18332
[153]</</R@https://labs.w3.org/hatchery/ash-nazg/js/app.js:9:18515
[141]</</r.measure/i@https://labs.w3.org/hatchery/ash-nazg/js/app.js:9:3382
[169]</</o.closeAll@https://labs.w3.org/hatchery/ash-nazg/js/app.js:10:3608
[169]</</o.perform@https://labs.w3.org/hatchery/ash-nazg/js/app.js:10:2940
[119]</p.batchedUpdates@https://labs.w3.org/hatchery/ash-nazg/js/app.js:7:27005
u@https://labs.w3.org/hatchery/ash-nazg/js/app.js:9:17278
r@https://labs.w3.org/hatchery/ash-nazg/js/app.js:9:12885
[152]</</f.enqueueSetState@https://labs.w3.org/hatchery/ash-nazg/js/app.js:9:14686
[100]</</r.prototype.setState@https://labs.w3.org/hatchery/ash-nazg/js/app.js:6:22733
[14]</v</<.value/<@https://labs.w3.org/hatchery/ash-nazg/js/app.js:2:6433
1 app.js:1:596
[1]</t.exports.error() app.js:1
[19]</t.exports.catchHandler() app.js:2

[Meta-issue] Track ideas and bugs as issues, instead of text

If I understand correctly, ideas for enhancements, bugs, the roadmap — those are kept in the file TODO.txt and in DEVELOPMENT.md, section “suggested improvements”.

I suggest we file one issue here for every idea/bug, and get rid of that copy. It will make it easier to have a clear picture of what's ahead, triage bugs, split the work among the team, and get stats on progress.

I'm happy to do that myself if you like the idea, @darobin.

Bug with associating Invited Expert with the system

The system emits an inscrutable error message when trying to associate a github profile with a w3c user account whose only affiliation is of invited expert.

The problem is that it assumes that Invited Expert is not a relevant affiliation, which is correct for CGs but incorrect for WGs.

The bigger problem is that it assumes one affiliation per user (but that'll be in a separate issue).

Revalidate PRs from users whose profile is updated

The system answers:
[[
User foobar is known to the system. You can edit that account.
]]

when the user pull request is classified as "unknown".

That's because the association with the W3C account is missing.

We should improve the message...

"Cannot convert undefined or null to object" when revalidating

Not sure if this is related to the repo manager per se, or just how it's been hooked up specifically to this repo, but: doing a PR on w3c/Mobile-A11y-Extension#9 resulted in an IPR failure (as I was, at the time, not part of the correct contributors list); trying to now trigger a revalidation on https://labs.w3.org/hatchery/repo-manager/pr/id/w3c/Mobile-A11y-Extension/9 i just get a "Cannot convert undefined or null to object" error and nothing further happens...

capture

Can't import repo?

Getting a 500 error importing a repo:

TypeError: Cannot read property &#39;name&#39; of undefined<br> &nbsp; &nbsp;at andify (/u/lab/ash-nazg/gh.js:69:82)<br> &nbsp; &nbsp;at Object.GH.createOrImportRepo (/u/lab/ash-nazg/gh.js:112:33)<br> &nbsp; &nbsp;at Object.GH.importRepo (/u/lab/ash-nazg/gh.js:90:14)<br> &nbsp; &nbsp;at /u/lab/ash-nazg/server.js:217:31<br> &nbsp; &nbsp;at /u/lab/ash-nazg/node_modules/async/dist/async.js:486:20<br> &nbsp; &nbsp;at /u/lab/ash-nazg/node_modules/async/dist/async.js:1074:13<br> &nbsp; &nbsp;at /u/lab/ash-nazg/node_modules/async/dist/async.js:952:25<br> &nbsp; &nbsp;at eachOfArrayLike (/u/lab/ash-nazg/node_modules/async/dist/async.js:990:13)<br> &nbsp; &nbsp;at eachOf (/u/lab/ash-nazg/node_modules/async/dist/async.js:1052:9)<br> &nbsp; &nbsp;at _asyncMap (/u/lab/ash-nazg/node_modules/async/dist/async.js:1067:9)

Repo I was trying to import:
https://github.com/WICG/memory-pressure/

Ability to ignore non-IP relevant PRs

Some PRs are only typos and don't need to stay flagged as problematic. It would be nice to have the ability to tell ash-nazg that a PR can be safely ignored

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.