These are scripts used to maintain various pieces of CC's open source community infrastructure.
The following workflows are ordered by schedule frequency and start time.
| Workflow | ||
|---|---|---|
| Status: | ||
| Schedule: | Hourly at 5 minutes past the hour (**:05) |
|
| YAML: | add_community_pr.yml |
|
| Action | ||
| [subhamX/github-project-bot][proj_bot] | ||
| Env | ||
| Required: | ADMIN_GITHUB_TOKEN |
This workflow adds community PRs in the [creativecommons/vocabulary][vocab_repo] repository to [Vocabulary Planning][vocab_plan] project.
[proj_bot] https://github.com/subhamX/github-project-bot [vocab_repo]: https://github.com/creativecommons/vocabulary [vocab_plan]: https://github.com/orgs/creativecommons/projects/13
| Workflow | ||
|---|---|---|
| Status: | ||
| Schedule: | Hourly at 30 minutes past the hour (**:30) |
|
| YAML: | sync_community_team.yml |
|
| Script | ||
| File: | sync_community_teams.py |
|
| Common Modules: | ccos/ |
|
| Specific Modules: | ccos/norm/ |
|
| Env | ||
| Required: | ADMIN_GITHUB_TOKEN |
This worflow creates GitHub teams for the Community teams and updates their membership based on the community_team_members.json Lektor databag.
- The databag is used to create the Community Team Members — Creative Commons Open Source page
- The databag is kept up-to-date by Push data to CC Open Source, above
| Workflow | ||
|---|---|---|
| Status: | ||
| Schedule: | Hourly at 45 minutes past the hour (**:45) |
|
| YAML: | normalize_repos.yml |
|
| Script | ||
| File: | normalize_repos.py |
|
| Common Modules: | ccos/ |
|
| Specific Modules: | ccos/norm/ |
|
| Env | ||
| Required: | ADMIN_GITHUB_TOKEN |
This workflow ensures that all active repositories in the creativecommons GitHub organization are consistent in the following ways:
- They have all the labels defined in
labels.ymlpresent. - They have standard branch protections set up (with some exceptions).
This script will only update color and description of existing labels or create new labels. It will never delete labels.
| Workflow | ||
|---|---|---|
| Status: | ||
| Schedule: | Daily at midnight:15 (00:15) |
|
| YAML: | push_data_to_ccos.yml |
|
| Script | ||
| File: | push_data_to_ccos.py |
|
| Common Modules: | ccos/ |
|
| Specific Modules: | ccos/data/ |
|
| Env | ||
| Required: | ADMIN_ASANA_TOKEN |
|
| Required: | ADMIN_GITHUB_TOKEN |
This workflow retreives data from Asana, formats it as a lektor databag, and pushes it to CC Open Source website source repository:
- Data Source: Community Team Tracking - Asana (limited access)
- Data Destination:
The destination data is used by the following pages:
- Community Team Members — Creative Commons Open Source
- Open Source Projects — Creative Commons Open Source
ADMIN_ASANA_TOKEN: Asana token with access to the Creative Commons Asana organizationADMIN_GITHUB_TOKEN: GitHub token with admin permissions to thecreativecommonsGitHub organization
| Workflow Name/Status | YML File Name | Workflow Purpose |
|---|---|---|
add_community_pr.yml |
Runs hourly at 5 minutes past every hour UTC and adds new Vocabulary issues to Vocabulary: In Progress | |
sync_community_team.yml |
Runs daily at 00:30 UTC and whenever someone pushes to the main branch and uses [sync_community_team][sync_team] |
|
track_backlog.yml |
Runs hourly at 45 minutes past every hour UTC and adds PRs to Active Sprint: Code Review and new issues to Backlog: Pending Review. Uses dhruvkb/issue-projector. |
Scripts that commit code or automatically reply to pull requests and issues need to be associated with a GitHub user account. Creative Commons maintains a cc-open-source-bot user for this purpose. This is useful for a few reasons:
- It's ethically important that our community members know when they are talking to a bot instead of a human.
- It makes it easy to audit our automations in the future, because all commits and messages will be associated with the single @cc-open-source-bot user account via the GitHub search, api, etc.
- We won't need to update automations when there are changes to staff or volunteers.
Using this bot clearly communicates when a commit, comment, or action was performed by an automation. For example, here is some configuration for a workflow using the Add & Commit GitHub Action:
# ...other settings here
- name: Commit changes
uses: EndBug/add-and-commit@v4
with:
author_name: cc-open-source-bot
author_email: opensource@creativecommons.org
message: "Deploy site"
add: "./example-directory"