Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test config comment 1 #615

Closed
wants to merge 11 commits into from
Closed
27 changes: 27 additions & 0 deletions .github/workflows/run-acceptance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,33 @@ jobs:

Maintainer note: consult the [runbook](https://github.com/pulumi/platform-providers-team/blob/main/playbooks/tf-provider-updating.md) for dealing with any breaking changes.

- if: github.event_name == 'pull_request'
name: Check Configuration section
run: |
sed -n '/## Configuration/,$p' README.md | sed -n '/## Reference/q;p' >> config_section.txt
jq -r '.config[] | keys[]' < provider/cmd/pulumi-resource-github/schema.json >> keys.txt
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
{
echo "MISSING_CONFIG<<$EOF";
xargs -I {} sh -c "grep -q {} config_section.txt || echo \\\`{}\\\` not found in Configuration section" < keys.txt
echo "$EOF";
} >> "$GITHUB_ENV"

- if: github.event_name == 'pull_request' && github.actor != 'dependabot[bot]'
name: Comment on PR with Details of Configuration check
uses: thollander/actions-comment-pull-request@v2
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
comment_tag: configurationCheck
message: >+
### Is README.md missing any configuration options?

${{ env.MISSING_CONFIG || 'No missing config!' }}


${{ env.MISSING_CONFIG && 'Please add a description for each of these options to `README.md`.' }}
${{ env.MISSING_CONFIG && 'Details about them can be found in either the upstream docs or `schema.json`.' }}

- name: Tar provider binaries
run: tar -zcf ${{ github.workspace }}/bin/provider.tar.gz -C ${{
github.workspace }}/bin/ pulumi-resource-${{ env.PROVIDER }}
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,15 @@ The following configuration points are available:
- `github:organization` - (Deprecated) This behaves the same as owner, which should be used instead. This value can also
be sourced from the `GITHUB_ORGANIZATION` environment variable.

appAuth not found in Configuration section
insecure not found in Configuration section
maxRetries not found in Configuration section
parallelRequests not found in Configuration section
readDelayMs not found in Configuration section
retryDelayMs not found in Configuration section
retryableErrors not found in Configuration section
writeDelayMs not found in Configuration section

## Reference

For further information, please visit [the GitHub provider docs](https://www.pulumi.com/docs/intro/cloud-providers/github)
Expand Down
Loading