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

Fix test script #58

Closed
jcbhmr opened this issue Apr 13, 2023 · 4 comments · Fixed by #63
Closed

Fix test script #58

jcbhmr opened this issue Apr 13, 2023 · 4 comments · Fixed by #63

Comments

@jcbhmr
Copy link
Contributor

jcbhmr commented Apr 13, 2023

image

from #57 where i wanted to see it go green

doesn't work for forks

likely problem: idk
likely solution: some fiddling with the github token perms in the settings tab?

basically the token needs READONLY perms to just the "contents: read" flag across forks which could be what's happening?

@spenserblack
Copy link
Owner

Screenshot is from a PR, right? IMO the solution is that this should be a dry-run for PRs, and actually push changes for pushes to main.

@jcbhmr
Copy link
Contributor Author

jcbhmr commented Apr 18, 2023

Screenshot is from a PR, right? IMO the solution is that this should be a dry-run for PRs, and actually push changes for pushes to main.

you're right. i was misunderstanding the error message. i thought it failed to pull when (youre right) it failed to push

thus something is wrong with this?

      - uses: ./
        with:
          # For now, you'll need to manually specify a GitHub token until we
          # solve #2. The x: prefix is a dummy username.
          token: x:${{ secrets.GITHUB_TOKEN }}
          dry-run: ${{ github.ref == 'main' }}

@jcbhmr
Copy link
Contributor Author

jcbhmr commented Apr 18, 2023

@jcbhmr
Copy link
Contributor Author

jcbhmr commented Apr 18, 2023

actually yeah that makes sense. pr has github.ref of jcbhmr:some-branch in:

dry-run: ${{ 'jcbhmr:some-branch' == main }}
dry-run: false

when it should be:

dry-run: ${{ github.ref != 'main' }}
dry-run: ${{ 'jcbhmr:some-branch' != 'main' }}
dry-run: true

🎉

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 a pull request may close this issue.

2 participants