UMM-CSci-3601 / intro-to-git

A group exercise practicing with various git ideas and tools
MIT License
2 stars 7 forks source link

I couldn't push a change to `.github/workflows/gradle.yaml` from GitKraken #40

Closed NicMcPhee closed 3 years ago

NicMcPhee commented 4 years ago

I changed the JDK version in .github/workflows/gradle.yaml (which specifies the info for GitHub Actions) and GitKraken "failed" when I tried to push. The message fades away fairly quickly, but here is what I think is the core info:

Refusing to allow an OAuth App to create or update workflow without workflow scope.

My guess (but it's only a guess) is that the problem is that @floogulinc used the Java CI template but then included gradle actions. There is a Gradle Command template for GitHub Actions and I have a feeling that this is what we're supposed to be using?

I tried doing the push from the command line, and it pushed fine, so it's clearly GitKraken being "smart" about something here. The action also succeeded fine, so whatever the problem is it's a "this is how you should do things" as opposed to "this is how you must do things" kind of issue.

floogulinc commented 4 years ago

This is an issue I have too. It is because GitKraken is an OAuth App on GitHub and that's how it authenticates the stuff it does. GitHub has restrictions in place to prevent such applications from modifying GitHub Actions. I have just tested and I seem to be able to push changes to a GH Action again. So it may be the case that you need to "refresh" your OAuth token for GitKraken so it gets the new permission scope. Though I do not exactly know how you might do so.

This reminds me to remind you that when you create the org for this semester to enable GitKraken for it or students won't be able to use GitKraken for repos in it.

NicMcPhee commented 4 years ago

This is an issue I have too.

That sort of sucks. So we have no idea whether students will run into this or not? It won't be an issue at the beginning of the lab because the actions will all be set up by us, but it might be something they run into later in the semester.

This reminds me to remind you that when you create the org for this semester to enable GitKraken for it or students won't be able to use GitKraken for repos in it.

Good catch. I'll create that org right now. Are there other things that will need to be enabled?

NicMcPhee commented 4 years ago

I've enabled access for:

I didn't enable Travis since I don't think we'll be using it, but it would be easy enough to add it later if we decided that would make sense.

NicMcPhee commented 4 years ago

Any thoughts on whether we should be using the Gradle Command template instead of the Java Template for GitHub Actions? It seems odd to not being using the Gradle tools if they exist.

floogulinc commented 4 years ago

The Gradle action you linked to is a third-party action while the Java template I used is exactly what GitHub suggests when you tell it you want to do Gradle (including the JDK 1.8). I didn't edit anything from what GitHub gave me. It comes from actions/starter-workflows.

image

It should be noted that there is a difference between a template and an action. The thing you linked is an action that is added to a workflow. A template is what GitHub lets you choose when you create a workflow to start from.

NicMcPhee commented 4 years ago

Gotcha. Then I'm fine with leaving things alone, especially for now.

I'm going to leave this issue open for now just in case we find that students can't push when we do the lab. After we're done running the lab, though, then we should probably close it (assuming nothing comes up).

NicMcPhee commented 3 years ago

@floogulinc's comment about OAuth up above seems to be the key issue, and I don't expect that will be a problem for this lab. In fact I doubt students will need to fiddle with the GitHub Actions config until they're into the project, if even then. So I'm going to close this.