Skip to content

feat: adding quality gate starter workflow#1

Open
farah-t-trigui wants to merge 1 commit into
mainfrom
feat/adding-starter-workflows
Open

feat: adding quality gate starter workflow#1
farah-t-trigui wants to merge 1 commit into
mainfrom
feat/adding-starter-workflows

Conversation

@farah-t-trigui

Copy link
Copy Markdown

Workflow templates (Actions) to choose from when wanting to code an action.
a good use case is the workflow-templates/quality-gate.yml where we already have some implementaion (unit testing, badges) to accelerate the task for developpers

@farah-t-trigui
farah-t-trigui requested a review from eskenazit July 13, 2026 14:36
@farah-t-trigui
farah-t-trigui force-pushed the feat/adding-starter-workflows branch from c2eee81 to cf59eff Compare July 13, 2026 15:20

@eskenazit eskenazit left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks for adding this starter workflow — nice first quality-gate template. Found (1) and (2) which are functional bugs that will silently break the two headline features (badge push + PR comment) in common scenarios, plus a few lower-priority nits.

Comment thread workflow-templates/quality-gate.yml Outdated

- name: Post or update PR comment
if: github.event_name == 'pull_request'
uses: marocchino/sticky-pull-request-comment@v2

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

(1) The "Deploy badge to badges branch" step and this "sticky-pull-request-comment" step run unconditionally on pull_request events. For PRs from forks, GitHub forces GITHUB_TOKEN to read-only regardless of the permissions: block declared above — so the badge push and this PR comment will silently fail on any external-contributor PR, defeating the two headline features of this template.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

done

Comment thread workflow-templates/quality-gate.yml Outdated
# different branches never overwrites another branch's badge.
- name: Generate badge JSON
run: |
BRANCH_SLUG=$(echo "${{ github.ref_name }}" | tr '/' '-')

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

(2) On pull_request events, github.ref_name resolves to the PR merge ref (e.g. 123/merge), not the source branch name — so the badge lands in a 123-merge folder instead of the real branch, defeating the "each branch gets its own subfolder" intent stated above. Consider using github.head_ref || github.ref_name instead.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

done

Comment thread workflow-templates/quality-gate.yml Outdated
uses: marocchino/sticky-pull-request-comment@v2
with:
header: quality-gate-report
path: pr-comment-body.md No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

(3) Missing trailing newline at end of file.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

done

{
"name": "Quality Gate",
"description": "Quality Gate workflow ready to use. Recommended starting point for any new codebase.",
"iconName": "quality-gate",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

(4) No matching quality-gate.svg was added alongside this properties file. GitHub falls back to a default icon without it, but a dedicated SVG would improve how the template appears in the Actions template gallery. Also missing a trailing newline at end of file.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

done

{
"name": "Quality Gate",
"description": "Quality Gate workflow ready to use. Recommended starting point for any new codebase.",
"iconName": "quality-gate",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

(5) This properties file has no filePatterns field, so the template is suggested to every repo in the org, including PoCs and non-code repos that may not want it imposed. Consider adding an explicit opt-in marker instead of stack auto-detection, e.g. "filePatterns": ["\\.github/quality-gate-enabled$"], and documenting that marker file in this repo's README/CONTRIBUTING so maintainers know how to opt in.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

done

@farah-t-trigui
farah-t-trigui force-pushed the feat/adding-starter-workflows branch from cf59eff to 7fa0aad Compare July 13, 2026 15:27
@farah-t-trigui
farah-t-trigui force-pushed the feat/adding-starter-workflows branch from 7fa0aad to 4f491c1 Compare July 13, 2026 16:39
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