mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 11:02:17 +00:00
fix: fix YAML parsing issues in PR gate workflows
- Wrap if condition in ${{ }} to avoid YAML tag interpretation
- Use array.join for multiline message to avoid block scalar issues
This commit is contained in:
parent
3eded2c146
commit
8b02aff629
2 changed files with 13 additions and 11 deletions
2
.github/workflows/approve-contributor.yml
vendored
2
.github/workflows/approve-contributor.yml
vendored
|
|
@ -6,7 +6,7 @@ on:
|
|||
|
||||
jobs:
|
||||
approve:
|
||||
if: !github.event.issue.pull_request
|
||||
if: ${{ !github.event.issue.pull_request }}
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
|
|
|
|||
22
.github/workflows/pr-gate.yml
vendored
22
.github/workflows/pr-gate.yml
vendored
|
|
@ -62,16 +62,18 @@ jobs:
|
|||
// Not approved - close PR with comment
|
||||
console.log(`${prAuthor} is not approved, closing PR`);
|
||||
|
||||
const message = `Hi @${prAuthor}, thanks for your interest in contributing!
|
||||
|
||||
We ask new contributors to open an issue first before submitting a PR. This helps us discuss the approach and avoid wasted effort.
|
||||
|
||||
**Next steps:**
|
||||
1. Open an issue describing what you want to change and why (keep it concise, write in your human voice, AI slop will be closed)
|
||||
2. Once a maintainer approves with \`lgtm\`, you'll be added to the approved contributors list
|
||||
3. Then you can submit your PR
|
||||
|
||||
This PR will be closed automatically. See https://github.com/${context.repo.owner}/${context.repo.repo}/blob/${defaultBranch}/CONTRIBUTING.md for more details.`;
|
||||
const message = [
|
||||
`Hi @${prAuthor}, thanks for your interest in contributing!`,
|
||||
'',
|
||||
'We ask new contributors to open an issue first before submitting a PR. This helps us discuss the approach and avoid wasted effort.',
|
||||
'',
|
||||
'**Next steps:**',
|
||||
'1. Open an issue describing what you want to change and why (keep it concise, write in your human voice, AI slop will be closed)',
|
||||
'2. Once a maintainer approves with `lgtm`, you\'ll be added to the approved contributors list',
|
||||
'3. Then you can submit your PR',
|
||||
'',
|
||||
`This PR will be closed automatically. See https://github.com/${context.repo.owner}/${context.repo.repo}/blob/${defaultBranch}/CONTRIBUTING.md for more details.`
|
||||
].join('\n');
|
||||
|
||||
await github.rest.issues.createComment({
|
||||
owner: context.repo.owner,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue