Skip to content

Play your own Switch games on iPhone/iPad — one-click macOS app, no terminal. | 把 Switch 游戏装进 iPhone:图形界面一键构建,不用命令行。Bring your own game.

probe: the same issue creation, dispatchable from the default branch

LNPANDYd19e942433c5
diff --git a/.github/workflows/issue-probe.yml b/.github/workflows/issue-probe.yml
new file mode 100644
index 00000000..10b62f12
--- /dev/null
+++ b/.github/workflows/issue-probe.yml
@@ -0,0 +1,28 @@
+name: Issue permission probe
+on:
+ workflow_dispatch:
+permissions:
+ contents: read
+ issues: write
+jobs:
+ probe:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - name: Who am I and what can I do
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ run: |
+ echo "--- gh auth status ---"
+ gh auth status || true
+ echo "--- token scopes via REST headers ---"
+ curl -sS -D - -o /dev/null -H "Authorization: token $GH_TOKEN" \
+ https://api.github.com/repos/${{ github.repository }} | grep -iE "^(x-oauth-scopes|x-accepted)" || true
+ echo "--- can I read issues? ---"
+ gh api repos/${{ github.repository }}/issues?per_page=1 --jq 'length' || echo "read failed"
+ echo "--- create an issue ---"
+ gh issue create -R ${{ github.repository }} --title "probe: can the workflow token open issues" --body "Temporary probe. Delete." \
+ && echo "CREATE OK" || echo "CREATE FAILED"
+ echo "--- and with -R only, no checkout needed ---"
+ gh issue create -R ${{ github.repository }} --title "probe 2: -R form" --body "Temporary probe. Delete." \
+ && echo "CREATE2 OK" || echo "CREATE2 FAILED"