Is there any way to show all GitHub tickets without an assignee? - github

It seems kinda silly that this feature wouldn't be there. I feel like I am overlooking something obvious, but I haven't been able to Google any answer successfully.

#LyndenShields's answer doesn't seem to work anymore.
At this date (March 16, 2015), the way to search for issues that have no assignee is to use the no: qualifier in the issues Filter field:
no:assignee
Alternatively, you could use the following query string to achieve the same:
https://github.com/<username>/<repo>/issues?q=no%3Aassignee
EDIT: Note that I could not make it work if I only had one qualifier specified (ie. you may need to add another one and have it like no:assignee is:open).
EDIT #2 (March 16, 2016): the above edit is not accurate anymore (hence the strikethrough); GitHub now accepts search queries with one qualifier only.
EDIT #3 (July 26, 2017): removed the %01 from the end of the URL - it basically is an unused character, but I believe GitHub interpreted it as a space. Indeed, when you use it this way, GitHub will automatically add a space, I guess to make sure other qualifiers can easily be added. Strangely, though, it will add a %20 to the end of the URL today, but again, you can simply omit that part. The %3A between the words no and assignee is the character code for Colon. See a full list here.
EDIT #4 (June 30, 2020): this is now possible via the UI: simply go to your issues list (https://github.com/<username>/<repo>/issues) then choose Assigned to nobody from the Assignee dropdown:

Go to the issues list and show issues assigned to yourself. Look in the URL bar and change where it has your username to none just after 'assigned/' and press enter. The UI will look the same but the list will have only unassigned issues.
e.g.:
https://github.com/<username>/<repo>/issues/assigned/none

One workaround would be to compare:
the list of issues
with the list of issue assigned to anyone
(the difference being the list of issues not yet assigned)
See GitHub V3 Api "list-issues-for-a-repository" section:
assignee
String User login
none: for Issues with no assigned User.
*: for Issues with any assigned User.

2021 Update.
In the search bar you must type no:assignee and this will show all Github issues without an individual assigned to it.

Related

VSTS: Built in variable for organization name?

In many of the calls described in the Azure DevOps REST API documentation, I need to supply the name of the organization, e.g.:
https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/releases?api-version=5.0-preview.8
The project I can get from System.TeamProject. I would have expected something similar for organization name, something like:
System.TeamFoundationCollectionName
This does not seem to be available. I've even printed out all of my environment variables on the agent and don't see anything that fits the need exactly. Sure, I can parse it out of one of the other values, but this seems fragile since MS seems to like to change the format of URLs.
I also can't hard code the organization name because this release definition will live in multiple organizations and we don't want to have to manually update it for each. How are others solving this problem?
Try using System.TeamFoundationServerUri and System.TeamFoundationCollectionUri to build your API requests. They have the organization included in them.
https://learn.microsoft.com/en-us/azure/devops/pipelines/release/variables?view=vsts&tabs=batch
edit: SYSTEM_TEAMFOUNDATIONSERVERURI/BUILD_PROJECTNAME/_apis/release/releases?api-version=5.0-preview.8
It looks like currently there is no such variable for the organization, also, the variables return the old URL (xxx.visualstudio.com) and not the new URL (dev.azure.com/xxx) so if you use the System.TeamFoundationCollectionName the API should work without the {organization}:
https://System.TeamFoundationCollectionName/{project}/_apis/release/releases?api-version=5.0-preview.8.
In Powershell, do this:
# Where SYSTEM_TEAMFOUNDATIONCOLLECTIONURI=https://some_org_name.visualstudio.com/
([System.Uri]$Env:SYSTEM_TEAMFOUNDATIONCOLLECTIONURI).Host.split('.')[-3] # returns 'some_org_name'
Now, just assign that to a variable and use it anywhere you like. "SYSTEM_TEAMPROJECT" is the Project Name, so no need to do any parsing there. It is already available.

Get a link to a specific line in a diff using GitHub API?

Using the GitHub API I'm looking for a way to generate a link to a specific line in a diff.
I can already contruct a "compare between commits" url, for example:
https://github.com/emmetog/feature-flags/compare/master...d8f9c29bfd0b87d26123b78b76feca8e4c87ad8
And visiting that url in a browser I can click on a specific line and I get this:
https://github.com/emmetog/feature-flags/compare/master...d8f9c29bfd0b87d26123b78b76feca8e4c87ad8#diff-21171d4ef87ca8e3591556dd18dfa456R26
However, I need to generate that last bit, the #diff-21171d4ef87ca8e3591556dd18dfa456R26 bit, programatically throught the github api, or else find another way of linking to the specific line in the diff without going through the browser.
Is this possible?
It is impossible.
I read https://developer.github.com/v3/repos/commits/#compare-two-commits
I tried
curl https://github.com/emmetog/feature-flags/compare/master...d8f9c29bfd0b87d26123b78b76feca8e4c87ad8
By using GitHub API, we can not specify what is the line 26th of different between new version and old version of file src/Emmetog/FeatureFlag/Entity/FeatureFlag.php
Because difference of 2 revisions doesn't happen at line 26, it is impossible for comparing. Or file src/Emmetog/FeatureFlag/Entity/FeatureFlag.php has only 10 lines of code, it is impossible for comparing.
In HTML webpage, id = diff-21171d4ef87ca8e3591556dd18dfa456R26 is auto-generated id. We can not specify intentional way before executing GitHub API request.
This may not be the best way to do it, but it looks like you can do some webscraping.
For example. In the link you provided. That line contains this element:
<td id="diff-21171d4ef87ca8e3591556dd18dfa456R26"
data-line-number="26" class="blob-num blob-num-addition
js-linkable-line-number selected-line"></td>
Which contains the diff hash. You also have the line number (26). Now you just need the 'R' between the diff hash and the line number. That, I believe, is given by whether the line has been added or removed. You can get that from the css class 'blob-num-addition'. It looks like 'blob-num-addition' corresponds to 'R' and 'blob-num-addition' corresponds to 'L'

Tiki: Unexpected return from trackerlib -> get_item_creators

I upgraded my tiki from 15.4 to 16.2. Everything runs fine. The problem is the site registration does not work. I have a tracker to extend my user information. In the tracker, I created a field called "Network" that allows the users to choose a group that them want to be in. Hence, they won't see each other content due to different group permission. This registration broke. The error message showed:
Cannot add nonexistent user xxx to group students
I found out the problem was that there is a change in trackerlib.php line 3671. Instead of returning "null", it now returns an empty array().
else {
return array();
}
In GroupSelector.php, line 124, the condition check
if (empty ($creators))) $creators=array($user);
This if will never be executed since the function now return an array not null. Hence causing the problem that no one can be registered if they choose a group in the registration form.
Propose solution, change the if condition in line 124 to:
if (empty($creators[0]))
My fix has now been improved by our colleague kroky6 (thanks!) and is now in the 16.x branch, so you can test it by using the 16.x nightly tarball from here tomorrow and will be in 16.3 (and 17.0 onwards) coming soon...
Did you check the actual 16.x version (dev branch) of this file (lib/core/Tracker/Field/GroupSelector.php) ?
https://sourceforge.net/p/tikiwiki/code/HEAD/tree/branches/16.x/lib/core/Tracker/Field/GroupSelector.php
Chances are, this is fixed already. :)
Bernard

TYPO3 : no updated newsletter with direct_mail and scheduler

This is my 1st question on this forum... So, please, be indulgent !
I'm using TYPO3 4.7.11 (PHP 5.3.3) with extension direct_mail 3.1.1 for the intranet site of a non-profit firm.
My problem (maybe connected to Bug #51583 : http://forge.typo3.org/issues/51583) is that, after numerous tests and attempts, it seems impossible to have an updated version of a page saved as draft for newsletter in an automatic scheduler driven way : the same newsletter is produced with the same informations that were already there on the day it was first created and saved.
The specific page used for newsletter includes a content element 'Menu/Sitemap' with 'Recently updated pages' as 'Menu type'. It has been saved as 'draft (for recurring sendings)' in Direct Mail.
The scheduler contains these 2 tasks with recurring type :
- Direct Mail: Create Mail from Draft (direct_mail)
- Direct Mail: Mailing Queue (direct_mail)
Note : the manual way is fully functional and the newsletter produced is really updated. Same with option "Testmail - Simple" !
So, my problem seems to be linked to the automatic scheduled mailing ! It looks as if the newsletter draft has turned into a freezed snapshot of a specific moment and that Typo3 is unable to update/recalculate this page when invoked in scheduler mode.
On the web, I saw reported problems that could be related like "When mails get sent via the scheduler the same subject is used for all sendings ( https://review.typo3.org/21313 )" and "Adding hooks when sending direct mails via scheduler ( forge.typo3.org/issues/48994 )", but these issues seem to be fixed with direct_mail 3.1.1 version.
I made these observations and, in my opinion, there is some relevancy :
1.There is no domain proposed in the 'Domain of internal links' drop-down list in 'Set default values for mail content fetching options' in Direct Mailer, and yet I have a single record in sys_domain table with a domain name (with no protocol and no final slash). Is there a reason why this record is not considered good, or isn't it the right table ? (uid=3, pid, tstamp, crdate, cruser_id, hidden, sorting, prepend_params and forced=0, redirectHttpStatusCode=301, domain_name=site.subdomain.domain, redirectTo=)
2.In the Typo 3 Log, I get this systematic error message for user _cli_scheduler#LIVE :
Core: Error handler (BE): PHP Warning: Invalid argument supplied for
foreach() in
...typo3conf/ext/direct_mail/Classes/Scheduler/MailFromDraft.php line
125.
The concerned part of MailFromDraft.php is this function : initializeHookObjects
...
/*
* Initializes hook objects for this class
*
* #return void
*/
function initializeHookObjects() {
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['direct_mail']['mailFromDraft'] as $hookObj) {
$hookObjectInstance = t3lib_div::getUserObj($hookObj);
if (is_object($hookObjectInstance) && ($hookObjectInstance instanceof x_directmail_Scheduler_MailFromDraftHook)) {
$this->hookObjects[] = $hookObjectInstance;
}
}
}
...
I'm not sure of understanding very clearly the origin and the use of the hook Object... (in spite of this interesting article by Robert Lemke : typo3.org/documentation/article/how-to-use-existing-hooks-in-your-own-extension/ )
3.Nothing like the apparently requested GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['direct_mail']['mailFromDraft'] seems to exist in TYPO3_CONF_VARS (Global configuration).
Can anybody give me an advice or a clue about what's going on and why I can't get a weekly updated newsletter with the scheduler ? I feel a bit confused !
Thanks in advance for any suggestion or solution (if a miracle is possible).
Greetings.
P-H SILLIAU
I've read about this issue before, but couldn't remember where.
Googling "direct_mail draft (for recurring sendings)" helped.
Try this bug: http://forge.typo3.org/issues/4421
User Markus says:
Things work fine, when you set a domain-record in your system and
select it in the direct_mail settings!
If you don't have a domain-record and specify it in the direct_mail
setup you're able to send normal newsletters, but if you try the
draft-functionality it won't work because the getUrlBase function in
class.tx_directmail_static.php returns an unsuable URL to the System
so it can't use the fetchHTML($file) and quits - therefore not
replacing the old draft contents created when starting the first time.
I don't really get why this works the first time you set up the draft
though....
So setting up the domain-record is a work-around that works.
I hope it does!
Probably, you will find more related topics.
Else, workarounds would be
re-considering the task. As it's a NPO intranet, maybe requirements are not that required suddenly, if asked again :-)
setting up a custom notification tool that only does that precise job.
To put an end to this problem, after many attempts (and informations gleaned from the internet), here is the solution we finally used in our specific case to make the newsletter work :
1st. We created a record in table sys_domain. This was a recurrent instruction in the manual and the forums, and it was IMHO legitimate.
Important : note that the redirectTo field had to remain empty, due to global malfunction of the site if filled (whatever we put in it like /, /var/www/sitename, ...)
2nd. All images, CSS, JS included in template had to be hardcoded (i.e. http ://site/fileamin/images/xxx.png for instance). If we didn't do that, the result would have been an abort in the production of the newletter : Not Found... Maybe, by digging a bit deeper, should we be able to find a parameter we forgot or neglected in some way to solve this issue...
3rd. In the newsletter template TS setup, we added these 2 parameters :
mod.web_modules.dmail.use_domain=[uid of sys-domain]
config.absRefPrefix = / (in order to get rid of PHP DOCUMENT_ROOT (or TYPO3_DOCUMENT_ROOT ?) otherwise wrongly present in all generated links.)
The result is now a well dynamically-generated newsletter, the date is OK, all links are correct and realUrl-compliant (no ../index.php?id=nnn) .... and you know what ?... We're happy ! :-)
Hope it will help !
Many thanks to everybody who answered (Markus, Urs...) or even thought of a possible solution...
P-H Silliau

GitHub advanced search default behaviour

I'm new to Github and just want to browse through repos to find interesting ones.
I want, say, all ruby repos with more than 100 followers.
I go to advanced search and try "followers:100"
and get only repos with EXACTLY 100 followers (4 at the moment).
That differs from what i expect to be default behavior - find repos with 100 or more followers (more like Stackoverflow search works).
I am quite frustrated, because I can't get what is expected to be basic search functionality from a very popular site, and that makes me think that I'm obviously not understanding something very simple (because I think it is not possible for Github not to have such functions).
So is there a way for me to get the desired result?
Update January 2013 (source: "A whole new code search")
followers:>100
(intervals are supported: followers:100..150)
Original answer (April 2011)
followers:[100 TO *]
should do what you want: see your query with 100 or more followers.
(Note: the "TO" needs to be in uppercase)
(Source: New and Improved Search)
For example, we can search:
for people with a username fuzzily similar to ‘chacon’
who use Ruby as their primary language,
have at least 5 repos and
at least one follower:
You might also like the Hubscovery application. A simple search interface for Github.