Skip to content

Conversation

@tekktrik
Copy link
Contributor

@tekktrik tekktrik commented Oct 28, 2025

This allows the Code of Conduct to be updated in this repository, and for that change to be propagated to other public Beeware repositories. The strategy is a two step process: plan the repositories to update, then attempt to update them in parallel using a matrix. Changes result in a PR to relevant repositories by Brutus in a new git branch that is timestamped both for uniqueness and record-keeping.

Maintaining a CoC is good! Doing it multiple times is painful! This allows maintainers to standardize a Code of Conduct and simply propagate the change.

PR Checklist:

  • [ X ] All new features have been tested
    NOTE: To the honest best of my ability without going overboard at this stage. It is not impossible that I forgot some weird quirk of the way GitHub Actions handles permissions or something. I tested the premise of actually using the GitHub CLI. I can create test infrastructure to test if more confidence is desired and no additional changes are requested. I will say that nothing in this PR is destructive, so the worst case is a dud not a meltdown.
  • [ X ] All new features have been documented
  • [ X ] I have read the CONTRIBUTING.md file
  • [ X ] I will abide by the code of conduct

@freakboy3742
Copy link
Member

Thanks for the PR - Don't worry about the CI failures; we're dealing with the fallout of some recent changes made in other repositories. #258 should be a fix for those; we should be able to land that within a day or so.

@tekktrik
Copy link
Contributor Author

Excellent! I'll flip this off of draft so it can be reviewed whenever is best!

@tekktrik tekktrik marked this pull request as ready for review October 28, 2025 12:59
Copy link
Member

@freakboy3742 freakboy3742 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of minor notes, but this looks great. I appreciate it's hard to test this one... I guess we'll find out when we use it in anger for the first time :-)

uses: actions/checkout@v4
- name: Update Code of Conduct
env:
GH_TOKEN: ${{ secrets.BRUTUS_PAT_TOKEN }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be:

Suggested change
GH_TOKEN: ${{ secrets.BRUTUS_PAT_TOKEN }}
GITHUB_TOKEN: ${{ secrets.BRUTUS_PAT_TOKEN }}

?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I chose GH_TOKEN based on the example here, despite often using GITHUB_TOKEN myself. After a quick search, it seems to prioritize GH_TOKEN:

GH_TOKEN, GITHUB_TOKEN (in order of precedence): an authentication token that will be used when a command targets either github.com or a subdomain of ghe.com. Setting this avoids being prompted to authenticate and takes precedence over previously stored credentials.

Not sure if GH_TOKEN is otherwise set, but this should for sure set it at highest precedence it seems.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL. Thanks for the research.


# Create the pull request
echo "Creating pull request to upstream..."
gh pr create --repo ${{ matrix.full_repo }} --title "Update Code of Conduct" --body "Updated using $GITHUB_REPOSITORY"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR title should probably include the date so we know it's the "2025-10-29 version" (and/or a repo hash?).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, good call, I can make that change!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I opted to leave out the datetime in the latest commit because I wasn't sure if timezones and datelines could be a minor confusion (and just using a UTC timestamp seemed even less helpful). I did add the commit hash both the to PR body as well as the actual commit itself so that it would be easier to backtrack from the git log itself (as well as at review time).

Happy to add the date with some more direction of how to pick (e.g., at UTC or some other specific timezone)!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Time is an illusion... and a hash is unambiguous, so lets go with that.

@tekktrik tekktrik requested a review from freakboy3742 November 4, 2025 01:38
Copy link
Member

@freakboy3742 freakboy3742 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good - thanks for that update and research.

Now to hold our breath for the first live test... :-)

uses: actions/checkout@v4
- name: Update Code of Conduct
env:
GH_TOKEN: ${{ secrets.BRUTUS_PAT_TOKEN }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL. Thanks for the research.


# Create the pull request
echo "Creating pull request to upstream..."
gh pr create --repo ${{ matrix.full_repo }} --title "Update Code of Conduct" --body "Updated using $GITHUB_REPOSITORY"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Time is an illusion... and a hash is unambiguous, so lets go with that.

@freakboy3742 freakboy3742 merged commit 2dfc43d into beeware:main Nov 4, 2025
143 of 144 checks passed
@tekktrik
Copy link
Contributor Author

tekktrik commented Nov 4, 2025

Fantastic! Please feel free to reach out here (or the Discord server, same username) if anything else comes up during the initial run!

@tekktrik tekktrik deleted the dev/coc-update branch November 4, 2025 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants