question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Only works on the master branch

See original GitHub issue

Pushing to non-master branches doesn’t create any issues.

Given that the develop branch is where most of my todo comments live, since they should be resolved by the time they reach master, this seems like a problem.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
GiovanHcommented, Nov 20, 2020

The trick with the BEFORE seems to have done it, thanks!

1reaction
weibullguycommented, Nov 18, 2020

I can confirm that issues can be created when pushing to the develop branch. My partial configuration is below. I split my workflow files up (one for master, one for develop, one for release branches, one for pull-requests), so the reason it works for me may simply be because the action only lives in my develop workflow file. However, it should be these lines that cause the action to refer to the develop branch when looking for TODOs:

with:
  ref: develop

Here’s the full configuration for this action in my develop branch workflow file:

name: Develop Branch Workflow
 
on:
  push:
    branches: develop

  todo_issue:
    name: Create Issues from Todos
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
          ref: develop
      - name: TODO to Issue
        id: todo
        uses: alstr/todo-to-issue-action@v2.0
        with:
          REPO: ${{ github.repository }}
          BEFORE: ${{ github.event.before }}
          SHA: ${{ github.sha }}
          TOKEN: ${{ secrets.GITHUB_TOKEN }}
          LABEL: "#// TODO:"
          COMMENT_MARKER: "#//"
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Read more comments on GitHub >

github_iconTop Results From Across the Web

How am I supposed not work on master branch?
First push with git flow feature publish feature_branch_name and all others only with git push . With git checkout branch_name you can leave ......
Read more >
Git - What issues arise from working directly on master?
First, I want to point out that in git, every pull is quite literally a branching operation, and every push is a merge....
Read more >
Master Branch Must Be Read-Only - Yegor Bugayenko
Continuous integration doesn't work while programmers are able to commit into the master branch. This article explains why and proposes a ...
Read more >
Git Like a Pro: Master-Only Workflow & Branching Strategies
The idea of master-only is that you don't have really long running branches that run back days, and have lots of pieces of...
Read more >
Branches in a Nutshell - Git SCM
The “master” branch in Git is not a special branch. It is exactly like any other branch. The only reason nearly every repository...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found