Skip to content

Add the roadmap auto commenter to this repository#12

Merged
DougReeder merged 3 commits into
mainfrom
roadmap-auto-commenter
May 12, 2026
Merged

Add the roadmap auto commenter to this repository#12
DougReeder merged 3 commits into
mainfrom
roadmap-auto-commenter

Conversation

@Exairnous
Copy link
Copy Markdown
Member

What?

Adds a workflow that calls the reusable roadmap auto commenter workflow when issues or pull requests are opened.

Why?

To activate the roadmap auto commenter for this repository.

Examples

See: #11

How to test

See the testing instructions in the companion PR: #11

Documentation of functionality

Currently, this is fully automatic with no configuration options and it is for the Hubs Foundation's use only (so not appropriate to put in the Hubs Docs). This helps to apply the roadmap policy. In light of all this, I don't think any additional documentation is needed at present.

Limitations

None known.

Alternative implementations considered

None.

Open questions

None.

Additional details or related context

Reusable roadmap auto commenter companion PR: #11

Once this is approved, I will open up PRs on all the other repositories (likely with https://github.com/gruntwork-io/git-xargs).

What: adds a workflow that calls the reusable roadmap auto commenter workflow when issues or pull requests are opened.

Why: to activate the roadmap auto commenter for this repository.

Note: see the reusable roadmap auto commenter commit/pull request in the .github repository for more information.

#11
Copy link
Copy Markdown
Member

@DougReeder DougReeder left a comment

Choose a reason for hiding this comment

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

I had to add these permissions to get it to work.

The workflow ran as intended for Issues with and without the Label Roadmap: Test.

The workflow ran as intended for a PR without the Label Roadmap: Test.

The workflow didn't run at all for a PR with the Label Roadmap: Test, which is hard to understand.

Comment thread .github/workflows/roadmap-auto-commenter.yml
@Exairnous
Copy link
Copy Markdown
Member Author

I had to add these permissions to get it to work.

Interesting. I thought having them on the called workflow was all that was needed. I guess we need to add them then, but I wonder why they weren't required when I tested.

The workflow didn't run at all for a PR with the Label Roadmap: Test, which is hard to understand.

That's weird. The entire workflow didn't run or it just skipped everything? It's supposed to skip everything if a roadmap label is applied, but the workflow itself should run each time an issue or PR is opened.

For reference, here are screenshots of the PR and Action run I did when testing adding an initial roadmap label:
2026-05-04_23-53

2026-05-04_23-53_1 2026-05-04_23-54

@Exairnous
Copy link
Copy Markdown
Member Author

I had to add these permissions to get it to work.

Hmm, I wonder if you had different default permissions on your GITHUB_TOKEN than I did. That could be it.

What: modifies the trigger of the workflow for pull requests from the `pull_request` event to the `pull_request_target` event and adds a warning comment about it.

Why: using the `pull_request_target` event will bypass the normal workflow approval rules of the repository and allow the auto commenter to work for pull requests made from external contributors/their forks; it is also safer because it will only run the workflow file from the Hubs Foundation, not the external contributor's pull request (which is why GitHub allows it to run automatically for everyone).
@hobbs-Hobbler
Copy link
Copy Markdown
Collaborator

Note: I'm not a suitable reviewer for the code for this PR, but it was explained to me at the May 6, 2026 Documentation Session and I approve of it (once we get it fully working).

…enter

What: adds explicit permissions to the `call_reusable_roadmap_auto_commenter` job.

Why: so that the auto-commenter will still work if the repository only grants read permissions by default to the GitHub token.  This is specified for the job instead of the whole workflow to comply with the principle of least privilege.
Copy link
Copy Markdown
Member

@DougReeder DougReeder left a comment

Choose a reason for hiding this comment

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

LGTM now

@DougReeder DougReeder merged commit 9b8a124 into main May 12, 2026
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.

3 participants