feat: add release announcement discussion to release-labeler#23
feat: add release announcement discussion to release-labeler#23
Conversation
Add announce-release job that creates a GitHub Discussion in the Announcements category when a release is published. Category ID is resolved dynamically via GraphQL (portable across repos), duplicates are checked against the first 100 discussions, and the body is passed via file to avoid shell expansion issues with release notes. Top-level permissions reduced to contents:read only, with job-level permissions for each job (discussions:write for announce-release, issues:write + pull-requests:write for label-release). Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
Summary of ChangesHello @CybotTM, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the release-labeler workflow by introducing automated release announcements. It streamlines the communication process for new software versions by publishing them directly to GitHub Discussions, thereby increasing visibility and engagement with the community without requiring manual intervention. Highlights
Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a new feature to automatically create release announcement discussions in the repository's 'Announcements' category. However, a high-severity command injection vulnerability was identified in the label-release job due to unquoted shell variables in a gh api call, which could lead to arbitrary command execution from malicious tag names. This should be addressed by properly quoting the variables. Additionally, a few improvements have been suggested to ensure security consistency across jobs and enhance the robustness of the shell scripts.
- Use env vars instead of GitHub expressions in duplicate check query - Add -- to grep to handle tags starting with hyphen - Add harden-runner to label-release job for consistent security Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
Summary
announce-releasejob torelease-labeler.yml.templatethat creates a GitHub Discussion in the Announcements category on each release publish-F body=@file) to avoid shell expansion issues with release notescontents: readonly; each job declares its own permissions (discussions: writefor announce-release,issues: write+pull-requests: writefor label-release)step-security/harden-runner@v2.14.2for egress auditingrelease-labeling.mdreference docs with new "Release Announcements" section and setup instructionsTest plan