actions-automation / manage-your-labels

Manage labels across organization or user repositories.
Apache License 2.0
10 stars 3 forks source link

Error on archived repositories #4

Closed carstingaxion closed 1 year ago

carstingaxion commented 1 year ago

Hello @mbestavros and thank you for sharing this nice action with the world.

I used your action for a while without any problems, until I archived one of my repositories. Now the actions runs fine until it hits the archived repo.

 File "/home/runner/work/_actions/actions-automation/manage-your-labels/main/src/mirror-labels", line 177, in <module>
    githubgql.graphql(CREATE_LABEL, token=token, accept="application/vnd.github.bane-preview+json", input={
  File "/home/runner/.local/lib/python3.10/site-packages/githubgql/githubgql.py", line 125, in graphql
    raise GraphQLError(data["errors"])
githubgql.githubgql.GraphQLError: [{'type': 'UNPROCESSABLE', 'path': ['createLabel'], 'locations': [{'line': 2, 'column': 5}], 'message': 'Repository was archived so is read-only'}]
Error: Process completed with exit code 1.

https://github.com/figuren-theater/.github/actions/runs/5424170871/jobs/9863140119

Is there anything I can do, to prevent this error? Would be great to read your opinion on this.

carstingaxion commented 1 year ago

Hi @mefellows and thank you for committing your fixed fork. 👍

mefellows commented 1 year ago

You're welcome! Apologies I did plan on re-contributing back the fix if it addressed it - want me to send a PR through or have you taken it on board?

carstingaxion commented 1 year ago

want me to send a PR through

This would be nice, but I assume, we both are not allowed to open a PR, without being a collaborator. But hopefully @mbestavros will take this into account and merge the fix soon.

or have you taken it on board?

I'm going to use your repo for now, lets see for how long ;)

carstingaxion commented 1 year ago

:+1: Tested and worked like a charm.

grafik

mefellows commented 1 year ago

Thanks, glad it's working for you! I've just opened a PR to this repo in case the change is acceptable to the author.

mbestavros commented 1 year ago

Hey @carstingaxion and @mefellows - apologies for the radio silence! This issue and accompanying PR were lost in my inbox, but thank you so much for the contribution. I'll look it over and likely merge it!

carstingaxion commented 8 months ago

Hey @mbestavros, long time ago, but I wanted to come back and Thank you!

Great you merged the provided fix.