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

Automate updation of maintainers in README #10673

Merged
merged 1 commit into from Feb 26, 2021
Merged

Automate updation of maintainers in README #10673

merged 1 commit into from Feb 26, 2021

Conversation

nandahkrishna
Copy link
Member

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?
  • Have you successfully run brew man locally and committed any changes?

This PR automates the updation of maintainers in Homebrew/brew's README and manpages. Rather than having this be a separate workflow, I've modified update-manpage.yml to update maintainers if it's the first day of the month (for efficiency).

Important: This requires the read:org scope to be available to the HOMEBREW_GITHUB_API_TOKEN secret.

@BrewTestBot
Copy link
Member

Review period will end on 2021-02-23 at 20:15:25 UTC.

@BrewTestBot BrewTestBot added the waiting for feedback Merging is blocked until sufficient time has passed for review label Feb 22, 2021
@Rylan12
Copy link
Member

Rylan12 commented Feb 22, 2021

I wonder if this should also run if the workflow is manually triggered (i.e. workflow_dispatch). Or, maybe a setting could be added to workflow_dispatch to indicate whether or not to update the maintainers. Otherwise, there's no way to test it out or manually update the maintainers unless you get lucky and it's the first of the month.


Separately, I wonder if it's even necessary to only run once a month. This workflow is only running once a day on a schedule, and I don't think this operation is so time-intensive that it will slow things down. I think we may as well update everything at once.

Maybe instead restrict updating maintainers to schedule or workflow_dispatch and not have it run on push events.

@nandahkrishna
Copy link
Member Author

Maybe instead restrict updating maintainers to schedule or workflow_dispatch and not have it run on push events.

I've updated it to run on events other than push, which would be schedule and workflow_dispatch.

Copy link
Member

@Rylan12 Rylan12 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 to me! 🎉

@nandahkrishna
Copy link
Member Author

Thanks Rylan! We just need to ensure the token has the required scope before merging this. (CC @MikeMcQuaid)

Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

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

LGTM. Will setup token when I get the chance (or another @Homebrew/plc or @Homebrew/tsc member can beat me to it).

@BrewTestBot BrewTestBot removed the waiting for feedback Merging is blocked until sufficient time has passed for review label Feb 23, 2021
@BrewTestBot
Copy link
Member

Review period ended.

@MikeMcQuaid
Copy link
Member

@nandahkrishna I think HOMEBREW_GITHUB_API_TOKEN already has read:org. Is there any way to trigger this to test it before it's merged?

@nandahkrishna
Copy link
Member Author

I think if the PR is created from a branch of Homebrew/brew, we could run it manually (workflow_dispatch).

@MikeMcQuaid MikeMcQuaid merged commit e64cf21 into Homebrew:master Feb 26, 2021
@MikeMcQuaid
Copy link
Member

Let's merge and try it out!

@nandahkrishna nandahkrishna deleted the automate-update-maintainers branch February 26, 2021 12:30
@nandahkrishna
Copy link
Member Author

nandahkrishna commented Feb 26, 2021

It seems the workflow run failed:

Error: GitHub API Error: This endpoint requires you to be authenticated.
Try again in 59 minutes 59 seconds, or:
Create a GitHub personal access token:
    https://github.com/settings/tokens/new?scopes=gist,public_repo,workflow&description=Homebrew
  echo 'export HOMEBREW_GITHUB_API_TOKEN=your_token_here' >> /home/runner/.bash_profile

Edit: Ah, my bad. Forgot to set the token. Thanks Mike!

MikeMcQuaid added a commit that referenced this pull request Feb 26, 2021
@BrewTestBot BrewTestBot added the outdated PR was locked due to age label Mar 29, 2021
@Homebrew Homebrew locked as resolved and limited conversation to collaborators Mar 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants