feat(appkit): expose headless resetWalletConnectUri + resetConnecting… #561
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Trigger Devin for Docs Update | |
| on: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read # Required to read github.event.head_commit.message | |
| jobs: | |
| trigger-devin-docs-analysis: | |
| # This job runs only if the head commit message on the push to main contains 'Release/' or 'release/' | |
| if: | | |
| contains(github.event.head_commit.message, 'Release/') || contains(github.event.head_commit.message, 'release/') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Send Slack Notification for Docs Analysis | |
| env: | |
| DEVIN_SLACK_WEBHOOK_URL: ${{ secrets.DEVIN_SLACK_WEBHOOK_URL }} | |
| DEVIN_SLACK_USER_ID: U08M9DKD4MC | |
| PROMPT_TEXT: | | |
| ## Context | |
| A release merge commit (SHA: ${{ github.sha }}) was just pushed to the main branch of the ${{ github.repository }} repository. This commit is the result of merging a release branch back to main after publishing. | |
| Your task is to analyze the impact of this specific commit on the reown-com/reown-docs repository. | |
| Please examine the changes introduced by commit ${{ github.sha }} in the ${{ github.repository }} repository. Focus your examination on the content of any `CHANGELOG.md` files modified in this commit. (Note: if multiple CHANGELOG.md files were part of this commit and are identical, examining one is sufficient, as per repository conventions). | |
| Determine if any of the changes in the `CHANGELOG.md`(s) from this commit necessitate updates to the documentation in the reown-com/reown-docs repository. | |
| ## Advice | |
| * If documentation updates are required, create a pull request in the reown-com/reown-docs repository. The pull request should: | |
| * Include the necessary documentation updates reflecting the changes from the appkit changelog. | |
| * Contain a clear description of why the updates are needed, referencing the specific changes from the appkit repository. | |
| * Include a link back to the original "chore: version packages" commit in the ${{ github.repository }} repository (Commit: ${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}). | |
| * Assign the following Github teams as reviewers in the pull request: @reown-com/appkit-web-team, @reown-com/devrel-team | |
| * If no documentation updates are needed, clearly state this conclusion. You do not need to open a pull request in this case. Simply report that no updates are necessary based on your analysis of the changelog. | |
| * You will need to operate within the following repositories: ${{ github.repository }} (for reading the changelog of the commit) and reown-com/reown-docs (for potentially creating a PR with documentation updates). | |
| run: | | |
| # Exit on error | |
| set -e | |
| # Check if the Slack webhook URL is provided and not empty | |
| if [ -z "${DEVIN_SLACK_WEBHOOK_URL}" ]; then | |
| echo "Error: DEVIN_SLACK_WEBHOOK_URL is not set or is empty." | |
| echo "Please ensure this secret is configured in the repository settings (Secrets and variables > Actions)." | |
| exit 1 | |
| fi | |
| # PROMPT_TEXT is set in the 'env' block and should be fully expanded by GitHub Actions. | |
| # Construct the final message text for Slack. | |
| MESSAGE_TEXT="<@${DEVIN_SLACK_USER_ID}> ${PROMPT_TEXT}" | |
| # Create the JSON payload for Slack. | |
| # jq 's --arg option handles escaping special characters in MESSAGE_TEXT for valid JSON. | |
| echo "Attempting to create JSON payload..." | |
| JSON_PAYLOAD=$(jq -n --arg text "$MESSAGE_TEXT" '{text: $text}') | |
| JQ_EXIT_CODE=$? | |
| if [ $JQ_EXIT_CODE -ne 0 ]; then | |
| echo "Error: jq command failed to create JSON payload (Exit Code: $JQ_EXIT_CODE)." | |
| # Log a snippet of the message text to aid debugging, avoiding overly long logs. | |
| echo "Original Message Text (first 200 characters):" | |
| echo "${MESSAGE_TEXT:0:200}..." | |
| exit 1 | |
| fi | |
| echo "Sending Slack notification for Docs Analysis." | |
| # Echo context information using direct GitHub context expressions for clarity and consistency. | |
| echo "AppKit Repo: ${{ github.repository }}" | |
| echo "Commit SHA: ${{ github.sha }}" | |
| echo "Commit URL: ${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}" | |
| # Send the notification to Slack using curl. | |
| # -s: silent mode (no progress meter). | |
| # -X POST: specifies the HTTP POST method. | |
| # -H "Content-Type: application/json": sets the content type header. | |
| # -d "$JSON_PAYLOAD": provides the JSON data for the request body. | |
| RESPONSE=$(curl -s -X POST \ | |
| -H "Content-Type: application/json" \ | |
| -d "$JSON_PAYLOAD" \ | |
| "${DEVIN_SLACK_WEBHOOK_URL}") | |
| CURL_EXIT_CODE=$? | |
| if [ $CURL_EXIT_CODE -ne 0 ]; then | |
| echo "Error: curl command failed to send Slack notification (Exit Code: $CURL_EXIT_CODE)." | |
| # RESPONSE might be empty or contain an error message from curl itself (e.g., if URL is malformed or network issue). | |
| echo "Curl response (if any): $RESPONSE" | |
| exit 1 | |
| fi | |
| # Check the content of the response from the Slack API. | |
| # A successful Slack webhook POST request typically returns the string "ok". | |
| if [ "$RESPONSE" = "ok" ]; then | |
| echo "Slack notification sent successfully." | |
| else | |
| echo "Error sending Slack notification: Slack API did not return 'ok'." | |
| echo "Response from Slack: $RESPONSE" | |
| exit 1 | |
| fi |