Skip to content

Alternate triggers (TagBot v2) #125

@christopher-dG

Description

@christopher-dG

Closes #62

@tkf had this awesome, delightfully simple idea (#62 (comment)) to use the registry CI to create issue comments on package repos, so that package repos can run TagBot on issue comments only. This is a huge improvement because TagBot will a couple hundred times per day at most instead of something like 50,000 times.

Here's the plan in more detail:

Registry

The General registry will have a new CI step added on merged PRs.
In this step, we parse out the repo, version, and commit from the newly merged PR so we know where to open our issue. Then, we check if TagBot is installed on that repo and if so, we open an issue and create a comment containing the new version and commit SHA (all the info that TagBot needs). If there's an existing issue on the repo that we created for a previous version, we can use that one to avoid creating extra noise in the repos.
This work will go in RegistryCI.jl so that maintainers of all registries can use it. I already have a prototype written.
Note: This requires a user token rather than the one provided by GitHub. Using one that belongs to @JuliaTagBot makes the most sense I think.

TagBot

TagBot's recommended workflow configuration will change to something like this:

name: TagBot
on:
  issue_comment:
    types: created
jobs:
  TagBot:
    runs-on: ubuntu-latest
    steps:
      - uses: JuliaRegistries/TagBot@v2
        if: github.actor == 'JuliaTagBot'

Instead of fetching information from the registry, TagBot will get its info from the issue comment body which contains the version to release and the commit SHA.
For custom registries, users can change the if condition and a new commenter input to specify the user that will be making comments.


Am I covering all the bases here? This is still kind of a kludge but it's way better than the current kludge. I don't think that official support for cross-repo events is coming any time soon.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions