Code Monkey home page Code Monkey logo

block-fixup-merge-action's People

Contributors

13rac1 avatar jplatte avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

block-fixup-merge-action's Issues

shellcheck?

shellcheck raises a few minor issues -- thoughts about #27 ?

$> shellcheck --format gcc entrypoint.sh
entrypoint.sh:21:15: note: Use $(...) notation instead of legacy backticks .... [SC2006]
entrypoint.sh:23:15: note: Use $(...) notation instead of legacy backticks .... [SC2006]
entrypoint.sh:23:21: note: Double quote to prevent globbing and word splitting. [SC2086]
entrypoint.sh:23:36: note: Consider using grep -c instead of grep|wc -l. [SC2126]
entrypoint.sh:31:16: note: Use $(...) notation instead of legacy backticks .... [SC2006]
entrypoint.sh:31:22: note: Double quote to prevent globbing and word splitting. [SC2086]
entrypoint.sh:31:37: note: Consider using grep -c instead of grep|wc -l. [SC2126]

Question: Works with private repositories?

Hey

Great action!

Is it suppose to work with private repositories?
so far I've been getting:

fatal: couldn't find remote ref xx/merge

** xx marks the pr number of course.

Diff only compares current branch with master

The script only compares current branch with master right now. It could check for closest branch https://stackoverflow.com/questions/3161204/how-to-find-the-nearest-parent-of-a-git-branch but that isn't always correct.

git show-branch -a \
| grep '\*' \
| grep -v `git rev-parse --abbrev-ref HEAD` \
| head -n1 \
| sed 's/.*\[\(.*\)\].*/\1/' \
| sed 's/[\^~].*//'

The best way is probably using the Github API https://developer.github.com/v3/repos/commits/#list-pull-requests-associated-with-commit

GET /repos/:owner/:repo/commits/:commit_sha/pulls

Block --squash commits?

These are similar to --fixup commits, but aren't mentioned in your docs. Could these be blocked too?

Doesn't handle !amend commits

Hand in hand with fixup! commits are !amend commits (e.g. git commit --fixup=amend:<SHA>)

Would be great if this action also blocked on those

Change to Github Actions breaks Action

๐Ÿค” Oddly this stopped working. There was a change to the Github Actions git configuration which made the git history disappear. Two issues:

  1. The action should fail when there is an error like this.
  2. The action should be working. Fix it.
Current ref: refs/heads/test-action
Current branch: test-action
fatal: ambiguous argument 'origin/master..origin/test-action': unknown revision or path not in the working tree.
Fixup! commits: 0
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

Using action as required check

Hi @13rac1,

If you're using this action to be a required check of a pull request, how can it ever succeed if it fails after the first push? The history of the failed Github actions remains in the checks-list, so it will always have an unsuccessful check, blocking the merge, if you fix the issues in a push following a failed one.

deprecation warnings

My build is getting deprecation warnings with this action:

--
The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/Show less

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.