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

Enable some permissions for MegaLinter #247

Closed
josecelano opened this issue Jun 6, 2022 · 0 comments · Fixed by #250
Closed

Enable some permissions for MegaLinter #247

josecelano opened this issue Jun 6, 2022 · 0 comments · Fixed by #250

Comments

@josecelano
Copy link
Member

We do not need to enable "write" permission because we are not using the auto-fix feature but we could enable this two permissions:

permissions:
  pull-requests: write
  statuses: write

The first one makes this kind of comment on the PR:

image

And the second one is used by MegaLinter

[GitHub Status Reporter] Error posting Status for SPELLwith cspell: 403
GitHub API response: {"message":"Resource not accessible by integration","documentation_url":"https://docs.github.com/rest/reference/repos#create-a-commit-status"}

to post a status on the pull request for each processed linter.

@josecelano josecelano mentioned this issue Jun 6, 2022
54 tasks
@josecelano josecelano linked a pull request Jun 6, 2022 that will close this issue
josecelano added a commit to josecelano/git-queue that referenced this issue Jun 6, 2022
$ {
  echo -e "-----BEGIN PGP PRIVATE KEY BLOCK-----"
  cat __tests__/fixtures/test-key-committer.pgp
  echo -e "\n-----END PGP PRIVATE KEY BLOCK-----\n"
} | gpg --import --batch --yes -
gpg: invalid armor header: lQdGBGGX3iEBEACqKHI35iK8y5lODg00/Uck4PDxxACldsT6OR01dmrDV2U0JYXw\n
gpg: key 27304EDD6079B81C: "A committer <[email protected]>" not changed
gpg: key 27304EDD6079B81C: secret key imported
gpg: Total number processed: 1
gpg:              unchanged: 1
gpg:       secret keys read: 1
gpg:  secret keys unchanged: 1

That code return error code 2 and this extra line:

gpg: invalid armor header: lQdGBGGX3iEBEACqKHI35iK8y5lODg00/Uck4PDxxACldsT6OR01dmrDV2U0JYXw\n

Fixed by adding a '\n' at the end of the header:

$ {
  echo -e "-----BEGIN PGP PRIVATE KEY BLOCK-----\n"
  cat __tests__/fixtures/test-key-committer.pgp
  echo -e "\n-----END PGP PRIVATE KEY BLOCK-----\n"
} | gpg --import --batch --yes -
gpg: key 27304EDD6079B81C: "A committer <[email protected]>" not changed
gpg: key 27304EDD6079B81C: secret key imported
gpg: Total number processed: 1
gpg:              unchanged: 1
gpg:       secret keys read: 1
gpg:  secret keys unchanged: 1
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.

1 participant